我有一个这样的查询:
select id from myindex
where match('main search keywords') and
myfilter in ('somevalue')
order by weight() desc limit 0,50
option max_matches=5000 facet myfilter limit 5000
sphinx conf 具有以下属性设置:
sql_attr_string = myfilter
此查询完美运行,我得到了main search keywords
按构面值过滤的结果somevalue
some value
但是,如果我的查询中有空格(像这样)或斜杠(像这样),则相同的查询不起作用some/value
(当然,数据库中的值带有空格和斜杠)。
“不起作用”是指它不会带来任何结果。
我还尝试转义正斜杠的情况,即我使用了some\/value
and some\\/value
,但它仍然没有返回任何结果,尽管 db 确实有它们。
有什么建议么?
编辑:
SHOW WARNING Result
Array
(
[Level] => warning
[Code] => 1000
[Message] =>
)
SHOW META Result
[0] => Array
(
[Variable_name] => total
[Value] => 0
)
[1] => Array
(
[Variable_name] => total_found
[Value] => 0
)
[2] => Array
(
[Variable_name] => time
[Value] => 0.000
)
[3] => Array
(
[Variable_name] => keyword[0]
[Value] => 694
)
[4] => Array
(
[Variable_name] => docs[0]
[Value] => 199
)
[5] => Array
(
[Variable_name] => hits[0]
[Value] => 199
)