使用过滤器创建高级搜索
我正在寻找狮身人面像,并发现了一种按一个或多个条件设置过滤器的方法。 我会得到一个食谱数据库。
在糕点里,我有一个表“记录”。 我有每个类型字段都是整数的卡片。 我还有一个“种类”字段,最后一个字段称为“成分”。
我正在寻找几件事。 对于以下示例,我有这个数据库,它可以工作但不完整: http://pastebin.com/80LbtnZW 这是我的 sphinx.conf: http://pastebin.com/Nmpci1aC 我首先想仅按 id 的降序显示我的字段类型,我应该做什么 添加? 我现在会添加一个过滤器,只取出善良 = 2 的巧克力。 最后同样的事情,还有一个额外的过滤器成分 = '牛奶'
我应该添加什么作为过滤器以按 id 排序,然后建立一个或多个 过滤器。
I'm looking sphinx and discovered a way to set up filters by one or more criteria.
I'll get a database of recipes.
In the pastry, I have a table "records".
I have cards for every type field is an integer.
I also have a field "kind" and finally a last field called "ingredients".
I'm looking for several things.
For the following example I have this database, which works but is not complete:
http://pastebin.com/80LbtnZW
and this is my sphinx.conf: http://pastebin.com/Nmpci1aC
I would first like to show my field type only in descending order of id, what should I
add?
I would now add a filter and take only the chocolates that are kind = 2.
And finally the same thing, with an additional filter ingredients = 'milk'
What should I add as a filter to sort by id, and thereafter, to establish one or more
filters.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
按 ID 排序...
添加过滤器...
您可以添加任意数量的过滤器,确保您已将要过滤的字段声明为属性。
Sort by ID...
Add filter...
You can add as many filters as you like, make sure you have delcared the fields you are filtering as attributes.