I have used min_infix_len => 2 in my model.rb file to improve searching of items by splitting up the words in sphinx. Everything is working fine in development.
But in my production the words are not getting split up and searched.
For example,
If I have string like this "1234567890". I am getting the string in search result if I give the entire string as "1234567890". But if i give as "123" the search term is not getting searched and shown. To overcome this problem I have use min_infix_len => 2 in model.rb like below.
define_index do
indexes id
indexes title
indexes ticket_status
indexes state
set_property :min_infix_len => 3
end
And generated the index, this get updated in my development.sphinx.conf as below:
index ticket_core
{
path = /home/abhiram/projects/railsfactory/connect/db/sphinx/development/ticket_c
index ticket_core
charset_type = utf-8
min_infix_len = 3
source = ticket_core_0
}
After this if restart sphinx and search I got the expected result and that string is getting searched as I expected.
But in production I have the same setup, index also getting updated in my production.sphinx.conf
index ticket_core
charset_type = utf-8
min_infix_len = 3
source = ticket_core_0
}
After restarting sphinx, normal search is working fine but the substring search which I expected like above is not working like it worked in development. The string is not getting searched without giving the complete string in the field.
This is my sphinx.yml
development:
bin_path: '/usr/bin'
production:
bin_path: '/usr/bin'
I don't no how to debug this in sphinx. Can any body guide me in this. I want to know how to make min_infix_len = 3 to work in production.
I am using old version of rails, since the app is old:
rails 2.1 ruby 1.8.7 thinking-sphinx 1.4.14