Ah, if you want the total count (not paginated count) in the search_for_ids call, something like the following should do the trick: ids = Model.search_for_ids 'foo' total_found = ids.results[:total_found]
Cheers -- Pat On 13/07/2009, at 6:45 AM, Alex wrote: > > Doesn't that require two searches to get both the ids and the count? > > On Jul 12, 2:25 pm, Pat Allan <[email protected]> wrote: >> Hi Alex >> >> There's Model.search_count/ThinkingSphinx::Search.count which should >> do what you want (along with the search_for_ids) - which both take >> the >> same arguments as a normal search call. >> >> -- >> Pat >> >> On 12/07/2009, at 5:19 PM, Alex wrote: >> >> >> >>> Is there a way to search for only ids and also retrieve the total >>> count? >> >>> Right now it seems the id search can not do this. >> >> > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
