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
精彩评论