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.
Description
The lexical parts of our search have always searched for the stemmed, lowercased phrase using the words in the same order that they are in the query, i.e.
text_block contains query
. This swaps outcontains()
foruserInput()
as per the Vespa example.userInput()
does some Vespa heavy lifting to convert text queries into Vespa queries, and is configurable in ways that could be useful to us later e.g. prioritising prefixes.Fields to search are now defined using the default fields for each schema.
This now means that more tests pass at search fixes - PR on that soon!
Before & after
For search "adaptation plans and strategies":
Before: we only match fields which contain some of the words in a different order because of embedding search. BM25 score is 0 for all results where all the words aren't present in the right order.
After: example of bm25 score working for text fields where the terms aren't in the same order as in the query, and not all the search terms are in the query
Proposed version
Please select the option below that is most relevant from the list below. This
will be used to generate the next tag version name during auto-tagging.
Visit the Semver website to understand the
difference between
MAJOR
,MINOR
, andPATCH
versions.Notes:
used -- e.g. Major > Minor > Patch
sure your selected option is marked
[x]
with no spaces in between thebrackets and the
x
Type of change
Please select the option(s) below that are most relevant:
How Has This Been Tested?
Please describe the tests that you added to verify your changes.
Before submitting
section of the
CONTRIBUTING
docs.Writing docstrings section of the
CONTRIBUTING
docs.