Hi Dandan,

Wouldn't ThinkingSphinx::Search#results[:words] do what you need?

ThinkingSphinx.search('blue').results[:words]
=> {"blue"=>{:docs=>2, :hits=>4}}

-T-

On Tue, Jan 10, 2012 at 13:55, Dandan <[email protected]> wrote:
> Hi,
>
> I'm trying to get the total occurrences that a search term appears in
> text. For example if the search term is "blue" and I have two records
> to search: "the blue blue sky" and "a blue day under a blue sky" I
> would want a total of 4.
>
> If possible from there, in some cases I will be grouping the totals of
> word by another field in the table.
>
> Any ideas? Thanks!
>
> --
> 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.

Reply via email to