如何禁用特定搜索的通配符查询

How to disable wildcard queries on specific searches

我已经为通配符搜索设置了 'dict = keywords' 和 'min_infix_len = 3'。但我不想对特定查询进行通配符搜索。我怎么做 ?现在每个查询都像这样执行 - *$query* ,我认为这很奇怪..

例如,如果我搜索 'gig' 它匹配 'gigabyte' 'magig' 等。PHP api 和 [=23= 都会发生这种情况]

版本: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

}

想通了!

我必须添加索引选项 'enable_star = 1' 。 此选项现在已在更高版本中弃用(默认设置为 1),因此造成混淆。