开发者

searching in a part of word with Sphinx

I need to configure Sphinx to search for parts of word, not wh开发者_JAVA百科ole. It's written on the official site, that I should use directives 'min_infix_len', 'min_prefix_len' and 'enable_star'. Actually, all registered in the config file.

But search in a word part doesn't work. * in the beginning or end of a word is not helping.

source src1
{

  type= mysql
  sql_host= localhost
  sql_user= root
  sql_pass=
  sql_db= ajax
  sql_port= 3306

  sql_query= \
    SELECT id, bookauthor FROM authors
    sql_query_info= SELECT * FROM authors WHERE id=$id
}


index index1
{
  source= src1
  path = /var/data/src1
  morphology =stem_en
  min_word_len = 1
  charset_type = sbcs
  enable_star=1
  min_infix_len =3
  min_prefix_len = 3
}

searchd
{
  listen = 9312
  log = /var/log/searchd.log
  query_log = /var/log/query.log
  pid_file = /var/log/searchd.pid
}


You can only implement one of them

min_infix_len =3 min_prefix_len = 3

Prefix is for *something

Infix can be used with everything..

Remove one of them

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜