Question

I am trying to use Sphinx RT index for my website. Everything works except infix searching.

index rt
{    
 type = rt

 path = /var/lib/sphinxsearch/data/rt.sph

 rt_field = name
 rt_field = address
 rt_field = keyword
 rt_attr_uint = type
    min_word_len        = 1
    min_infix_len       = 3
    enable_star     = 0
    html_strip      = 0
    inplace_enable      = 0
    charset_type        = utf-8
}

I inserted some values to my rt index. Example:

Insert into rt(id,name,address,keyword,type) values(100,'JohnRambo','Newyork','assassin',1);

Now, when I search for 'JohnRambo', it returns me the correct result. But when I search for 'John' or 'Rambo', it gives me an empty result set.

mysql> select * from rt where match('John');
Empty set (0.00 sec)

Is there anything that I am missing? Any help is much appreciated!

Was it helpful?

Solution

Infix/prefix searching requires dict=keywords on a RT index.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top