Unable to get infix searching to work properly

33 views
Skip to first unread message

concept47

unread,
Feb 23, 2012, 4:04:59 PM2/23/12
to thinkin...@googlegroups.com
This is my sphinx.yml

development:
    enable_star: true
    min_infix_len: 4 
    morphology: stem_en
    charset_table: 0..9, A..Z->a..z, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F

Thinking Sphinx Ruby gem 1.4.10 and Sphinx 0.9.9

----------

So lets say the row in question has this text in a column we've indexed ---> "tumblr_lrfa4pBlA51qlo9hgo1_500.jpg"?

At first, doing a search for "tumblr" wasn't working at all.
Then I figured out it was because "_" was in the charset_table list so it was indexing the entire thing (upto the .) as a word.

I took that out and now a search for "tumblr" returns that result, but a search for "tumbl" does not.
I figure that's because sphinx is breaking "tumblr_lrfa4pBlA51qlo9hgo1_500.jpg" up into "tumblr", "lrfa4pBlA51qlo9hgo1", "500" and "jpg".
Its matching full words but not substrings ... to confirm I tried a search for "lrfa4pBlA51qlo9hgo1", and that returns the row correctly.

of course, if a search for "lrfa4pBlA51qlo9hgo" returns nothing. aaaack!

I'm not sure why this doesn't work.
Any help or suggestions are appreciated.


Pat Allan

unread,
Feb 23, 2012, 7:31:22 PM2/23/12
to thinkin...@googlegroups.com

I know the Sphinx documentation seems to suggest otherwise, but the only way I've found infixes working is if you use the star/wildcard syntax as well:

tumbl*

You can do this automatically with TS if you add :star => true to your search queries.

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/0UX3RcKNfQMJ.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.

Reply all
Reply to author
Forward
0 new messages