Probem: When searching texts with multiple occurrences of words similar to the search query they get higher rank than texts with one exact match.
Example: Say search query is "productivity", then "production of organic products" gets higher rank than "labour productivity" just because it contains two similar words, though no exact word matches.
Question: What's the best way to prioritize records that have exact matches?
Here's my pg_scope:
pg_search_scope :search,
:against => {
:title => 'A',
:search_string => 'B'
},
:using => {
:tsearch => {
:dictionary => 'english',
:any_word => 'true'
}
}
Thx.