Skip to content

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.

2 participants