Tweak search algorithm for more relevant results #508
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is not ready for merge but rather review. @allan23 @ChrisWiegman @lukaspawlik @dkotter @AaronHolbrook
Here are the proposed changes:
operator => 'and'
tomulti_match
clause. Right now any document containing ANY of the search terms returns a match with a 2x boost. Let's only give the 2x boost to docs that contain ALL the terms.multi_match
query of typephrase
. This clause gives a 4x boost to documents containing the terms exactly as is in the EXACT order.P.S. If anyone wants a cool project, we need a way to unit test relevancy accuracy.