[Issue #2775] Opportunity number partial match fix #2777
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.
Summary
Fixes #2775
Time to review: 5 mins
Changes proposed
Adjusts the fields we query against and how in search
Context for reviewers
I wrote up a pretty thorough explanation of keyword vs non-keyword on #2775 - check that out. In short, the bug here is due to how the request/field being compared are tokenized. Keyword leaves a field "whole" and non-keyword tokenizes it into pieces. In the case of opportunity number splitting on each of the dashes (so
ABC-123-XYZ
becomes["ABC", "123", "XYZ"]
. In short, to support all the ways someone might want to query for an opportunity number, it's easiest to just include both.Additional information
Some testing locally where I set the opportunity number to
FY25-BSB-56789
andFY25-BSB-12345
for two opportunities: