Brad, This is probably because of the default pagination of search results is a page size of 20. The search_count will get the number of matches, while search_for_ids is probably getting paginated results (of ids). Are your other searches returning fewer than 21 results? If so, I suspect that this is the case. You could try adding a :per_page value on search_for_ids that is a larger number to see if this helps figure diagnose the issue.
Cheers, Chris Foy On Thu, Jul 15, 2010 at 10:51 AM, Brad Langhorst <[email protected]> wrote: > When I examine > Reference.search_for_ids(search_string, search_params).length I find 20 > results for my data set. > When I do Reference.search_count(search_string, search_params) I find 21 > results > The actual search Reference.search(search_string, search_params) produces 20 > results > > Oddly - this is not the case for my searches for other objects, so I suspect > this is not a simple issue. > > Any ideas? > > brad > -- > Brad Langhorst > Postdoctoral Fellow > New England Biolabs > [email protected] > > > > > -- > 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. > > -- 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.
