Sphinx过滤器-过滤器属性之间可以有一个“或”吗? [英] Sphinx Filters - Can I have an 'OR' between filters attributes?
问题描述
我正在使用狮身人面像在这里列出我数据库中的一些项目。
差不多100%,我只是还没有弄清楚如何在两个不同的过滤器之间创建 OR
。例如:
I'm using sphinx to list me some items from my database here.
It's almost 100%, I just haven't figured out yet how to create an OR
between two different filters. For example:
数据库中的我的对象具有开始日期和结束日期,我可以 filter(starting_date,x,y)
和 filter(ending_date,x,y)
,但是这两个过滤器都必须返回true才能带给我该对象,我该怎么说sphinx过滤该属性,还是那个?
My Object in the database has a starting and an ending date, I can filter(starting_date, x, y)
and filter(ending_date,x,y)
, but both filters will have to return true to bring me the object, how can I say to sphinx filter this attribute, or that one?
推荐答案
Sphinx使用|或
Sphinx uses | for or
为黑色或白色为黑色 | 白色
http://www.sphinxsearch .com / docs / manual-0.9.9.html#boolean-syntax
as in "black" OR "white" would be "black" | "white" http://www.sphinxsearch.com/docs/manual-0.9.9.html#boolean-syntax
这篇关于Sphinx过滤器-过滤器属性之间可以有一个“或”吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!