Ferret: can i use conditions AND get search scores?

I’m having a problem where i want to search across multiple models, with
conditions, but some of my conditions break certain models because they
don’t have a field tested against in the conditions.

So, i want to instead do find_by_content_id on each model seperately,
then put them all together into one array, sort it by score, and then
paginate across it. The problem is that if you do ‘find_by_content_id’
you can’t pass conditions through! (or at least it seems that way to me

  • find_id_by_contents only takes an ‘options’ hash, not a ‘find_options’
    hash as well).

So, there’s no way to pass conditions through AND get the search score
for each found item. Is this the case? Or is there a way to do this
that i just can’t see? It seems like something that people would want
to do fairly often…


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs