You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm searching with a couple of words I want objects with 2 or 3 words matching to be on the top of the list. Need to implement default sorting by best match or provide a search score in the output.
Implemented on master by #156 (planned for 0.6.0; not yet released). Enable Mongoid::Search.relevant_search = true, then call Model.full_text_search(query): results now expose a numeric relevance and are sorted highest-relevance-first. A real MongoDB regression searches for two words and verifies that the two-word match precedes the one-word match with scores [2, 1]. Ordinary search remains unchanged; scoring counts exact normalized keyword matches, rather than providing phrase-exactness or a separate exact-title boost. See UPGRADING.md.
This comment was posted by an AI on behalf of @dblock.
Activity
dblock commentedon Oct 18, 2026
Implemented on master by #156 (planned for 0.6.0; not yet released). Enable
Mongoid::Search.relevant_search = true, then callModel.full_text_search(query): results now expose a numericrelevanceand are sorted highest-relevance-first. A real MongoDB regression searches for two words and verifies that the two-word match precedes the one-word match with scores[2, 1]. Ordinary search remains unchanged; scoring counts exact normalized keyword matches, rather than providing phrase-exactness or a separate exact-title boost. See UPGRADING.md.This comment was posted by an AI on behalf of @dblock.