I use Sphinx 2.0.9-release (rel20-r4115). I will give 2.1.2 a shot and reply you soon
On Monday, October 28, 2013 7:38:54 PM UTC+7, Pat Allan wrote: > > Hmm, that certainly seems like it should work. What version of Sphinx are > you using? If you’re not using 2.1.2, could you give that a shot? Make sure > you change things appropriately as noted in the TS 3.0.6 release notes: > https://github.com/pat/thinking-sphinx/releases/tag/v3.0.6 > > — > Pat > > On 28 Oct 2013, at 3:09 pm, Duy Vo <[email protected] <javascript:>> > wrote: > > OK, here are real world example: > I have this index > > ThinkingSphinx::Index.define :user, :with => :real_time do >> indexes username, :infixes => false >> indexes unique_id, :infixes => true >> >> set_property :min_infix_len => 10 >> set_property :enable_star => 1 >> has company_id, :type => :integer >> end > > sphinx config: > >> index user_core >> >> { >> >> type = rt >> >> path =*****/sphinx/development/package_core >> >> docinfo = extern >> >> dict = keywords >> >> charset_type = utf-8 >> >> min_infix_len = 10 >> >> infix_fields = unique_id >> >> enable_star = 1 >> >> rt_field = sphinx_internal_class_name >> >> rt_field = username >> >> rt_attr_uint = sphinx_internal_id >> >> rt_attr_uint = sphinx_deleted >> >> rt_attr_uint = company_id >> >> rt_attr_string = sphinx_internal_class >> >> } >> >> Then I search: > >> User.search('9613804767881392429376') #=> Found >> User.search('96138047678813924293*') #=> Found >> User.search('96138047678813924293', :star => true) #=> Found >> User.search('*38047678813924293') #=> Not found >> User.search('38047678813924293', :star => true) #=> Not found > > > On Sunday, October 27, 2013 6:16:52 PM UTC+7, Pat Allan wrote: >> >> You are correct, infix and wildcard are separate settings, but I think >> you might need both (and use the wildcards in your queries or :star => true >> option when searching) to get matches back. I’ve found it’s unreliable >> without the wildcards. >> >> I’m not sure why User.search('*c123def456’) doesn’t return any results >> though… If something matches, I’d expect it to be returned. >> >> Can you perhaps show us real examples of what you’re searching for? I’m >> guessing abc123def456 is not actually what’s in the database :) >> >> — >> Pat >> >> On 23 Oct 2013, at 11:05 pm, Duy Vo <[email protected]> wrote: >> >> Sorry but after deep checking, I notice something strange. >> First, I have min_infix_len => 10 on customer unique_id. But when i >> search, it can only search when I add *, which mean >> User.search('abc123def4*') have value and User.search('abc123def4') don't. >> In my opinion, infix and wildcard * is 2 different things, right? >> Second, follow search way from above, i can search >> User.search('abc123def4*') but can't search User.search('*c123def456') >> Third, min_infix_len is 10, but i can search with User.search('abc*') >> >> >> On Tuesday, October 22, 2013 6:04:55 PM UTC+7, Duy Vo wrote: >>> >>> Hi (again) >>> I read some post about wildcard search in >>> FAQ<http://pat.github.io/thinking-sphinx/common_issues.html#wildcards> >>> and >>> here<http://blog.wyeworks.com/2009/4/20/wildcard-search-with-thinking-sphinx/>. >>> >>> Here are my index >>> >>> ThinkingSphinx::Index.define :user, :with => :real_time do >>>> indexes username, unique_id >>>> has company_id, :type => :integer >>>> set_property :enabled_star => 1 >>>> set_property :min_infix_len => 10 >>>> end >>> >>> >>> Regenerate success but i can't search using wildcard. >>> User.search('abc123def456') return the user but User.search('abc123def4*') >>> return []. >>> Is the config for wildcard work for realtime index? or is it change >>> recently. Thank you >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Thinking Sphinx" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/thinking-sphinx. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected]<javascript:> > . > Visit this group at http://groups.google.com/group/thinking-sphinx. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/thinking-sphinx. For more options, visit https://groups.google.com/groups/opt_out.
