gyaani_guy
gyaani_guy

Reputation: 3209

How to disable wildcard queries on specific searches

I have set 'dict = keywords' and 'min_infix_len = 3' for wildcard searching. But I want NOT to have wildcard searches on particular queries . How do I do that ? Right now every query is executed as if it is like this - *$query* , which I think is strange..

For instance if I search for 'gig' it matches 'gigabyte' 'magig' etc. This happens both with the PHP api and search.exe

Version: 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

}

Upvotes: 0

Views: 271

Answers (1)

gyaani_guy
gyaani_guy

Reputation: 3209

Figured it out!

I had to add the index option 'enable_star = 1' . This option is now depreceated (and set to 1 by default) in later versions , hence the confusion.

Upvotes: 1

Related Questions