Reputation: 10400
In a model,
I have defined indexes on some columns and have defined some attributes.
On some external application conditions, I don't want to sphinx to search in some columns values.
Upvotes: 0
Views: 45
Reputation: 16226
In the question name, do you mean attributes or fields? I'm guessing fields, as attributes are only used for filters...
So, to search on just specific fields, you can make a query like the following:
Model.search "@(title, body, user) foo bar", :match_mode => :extended
Put all the fields you want to search on within the parentheses, and you should be good to go.
Upvotes: 3