Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的查询
$query =SphinxQL::query()->select('*') ->from('property_table')->match('property_title','Plo',)->execute(); //property_title is column name
不检索包含数据的记录'Plo'
'Plo'
我需要一个具有%Plo%. 请帮帮我
%Plo%
这听起来与匹配模式无关。(匹配模式是旧 API 的遗留物,最好在 SphinxQL 中避免。)
默认情况下,Sphinx 仅匹配整个单词。为了能够匹配部分单词,需要在索引上启用它,min_infix_len最好min_prefix_len使用enable_star=1 - 然后您将能够在关键字中使用通配符,例如
min_infix_len
min_prefix_len
enable_star
->match('property_title','*Plo*')
如果您的索引很大,或者性能很关键,那么可能需要尝试使用dict选项。
dict