I have a search box on my site which retrieves model instances that
contain the search term in any of three fields.  Here is the code I am
using:

results = Feature.search(:match_mode => :any, :conditions => { :title
=> @search, :subtitle => @search, :description =>
@search }, :max_matches => 50, :per_page => 50)

Where Feature is the name of the model and @search contains the search
term.  I am getting rather peculiar results.  If I have multiple
matches, I sometimes get an extra record that does not contain the
search term in any of the fields.  It is always one of two records
which happen to be duplicates of each other.  If I have no matches, I
just get one of the extra records.

Is my syntax wrong or should I be looking for a corrupt index?  How
would I fix the corrupt index if that is what's going on?

Thanks for your help

Stan

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to