我已设置' dict = keywords'和' min_infix_len = 3'用于通配符搜索。但我不希望对特定查询进行通配符搜索。我怎么做 ?现在每个查询都像这样执行 - *$query*
,我认为这很奇怪..
例如,如果我搜索' gig'它匹配' gigabyte' ' magig'使用PHP api和search.exe
都会发生这种情况版本:Sphinx 2.1.2-release(r4245)
index fallinprices
{
source = fallinprices
path = f:/sphinx/data/fallinprices
docinfo = extern
charset_type = sbcs
wordforms = wordforms.txt
dict = keywords
min_infix_len = 3
#infix_fields = name
}
indexer
{
mem_limit = 32M
}
searchd
{
listen = 9312
listen = 9306:mysql41
log = f:/sphinx/log/searchd.log
query_log = f:/sphinx/log/query.log
read_timeout = 5
max_children = 30
pid_file = f:/sphinx/log/searchd.pid
max_matches = 10000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = f:/sphinx/data
}
答案 0 :(得分:1)
想出来了!
我必须添加索引选项' enable_star = 1' 。 此选项现在在以后的版本中被删除(并且默认设置为1),因此存在混淆。