开发者

sphinx search issue

My sphinx config is as follows

source city {
        type            =       mysql
        sql_host        =       localhost
        sql_user        =       root
        sql_pass        =       password
        sql_db          =       database

        sql_query                               = \
                SELECT id,name,cuisine, location,tag  \
                FROM city_search

        sql_query_info                  = SELECT *  FROM city_search WHERE id=$id
}

index city {
        source          =       city
        path            =       /usr/local/sphinx/var/data/city
        charset_type    =       utf-8
        morphology      =       stem_en
        min_stemming_len =      4
        min_word_len    =       3
        min_prefix_len  =       3
        enable_star     =       1
}

I have an index for a list of restaurants in a city, for this index I have created a view in Mysql to contain all information that a user can search

restaurant name cuisine location etc

Now when i search for a query like "indian" it should ideally return all restaurants containing the word cuisine but

for e.g this record which should be开发者_StackOverflow a valid document is not returned This is a column in my view, the cuisine field has all the cuisines that restaurant serves separated by a space

id name location cuisine 311 Verandah Baner Indian Italian Chinese

not sure what could be the issue

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜