Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'boost_and' option to Searchkick::Query #1628

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oshtman
Copy link

@oshtman oshtman commented Apr 20, 2023

First of all, thanks for a wonderful gem.

The "boost_and" option adds a second scoring query to fields that match with "ANY". This boosts the relevance of fields that also match the search query with an "AND" operator.

One of our examples would be e.g. an item in a store with title "cool jacket" with another field (lets call it "tag") equal to "Yellow".
Lets consider a user searches for an item with the query "Yellow jacket". We are using the "ANY" operator as we want to search each field in a document individually (title = jacket, tag = yellow),. However, in these scenarios we would like fields matching both words to be considered more relevant than fields only matching one (e.g. title=yellow jacket, tag=yellow => more relevant)

Please let us know if this might be a use case valid to merge to the repository or if it might be considered "to specific" to our use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants