I have a model School which is ferret-indexed on 10 or 12 different indexes.
In one particular search, i want to return only schools which match the search term in one of the following fields: ["name", "postcode", "urn"]
(urn is a uid kind of field)
For example, a search for "grange" should return schools with "grange" in their name but NOT return schools that have "grange" in their address (unless it's also in their name of course).
If there's just one field (eg name), i can achieve this by
School.find_with_ferret("name:#{term}")
But, i can't work out how to do this with a list of fields. I thought i might be able to use an "or" syntax, like
School.find_with_ferret("name:#{term} || postcode:#{term} || urn:#{term}")
or
School.find_with_ferret("name:#{term} or postcode:#{term} or urn:#{term}")
but neither of these work. Anyone know how to do this? Thanks, max