24
September
2006

code

Tagged as:
, , , , .

More on multi-model search with acts_as_ferret

So, Matt pointed out that when you do things like that, the scores for different Models are all ranked seperately because they’re coming out of different indexes. The trick, obviously, is to use the multi_search method, which generates a multi-model-index, and that’s probably a better approach. This approach is very well documented in the RDoc. So all it shows is: probably should have RTFM. The thing below isn’t by any means bad, it’s just a little like re-inventing the wheel.

Never mind, eh?

(This mail from Jonas is also worth a read on this matter).

1 comment on this entry to date. Add your own.

  • 12 October 2006

    Hi,
    How could I get the fieldname which was hit by keyword.

    Ex:
    In my index there are two fields TITLE and CONTENT.
    when i searched for keyword ARTICLE TWO, How could i get which field was hit by keyword.
    Thanks,
    It will be appreciated if you could mail me.
    Thanks again

Post a comment:

Please note that your comment may be moderated, and as such might not appear immediately.

My links and notes for this day

Endnotes