Conversation
The default operator in LuceneSearcher is now OR, allowing queries to match documents with any of the terms. Added unit test SearchUsesOrAsDefaultOperator to verify this behavior.
oyessb
requested review from
JohannesFinsveen,
MikaelNordberg,
likp and
runejo
as code owners
September 17, 2026 08:44
|
| ); | ||
| searchResult.Description = doc.Get(SearchConstants.SEARCH_FIELD_DESCRIPTION); | ||
| searchResult.SortCode = doc.Get(SearchConstants.SEARCH_FIELD_SORTCODE); | ||
| if (DateTime.TryParse(doc.Get(SearchConstants.SEARCH_FIELD_UPDATED), out updated)) |
Contributor
There was a problem hiding this comment.
Should the warnings from SonarQube be fixed
runejo
reviewed
Sep 18, 2026
| // The second term should not exist, so with OR the result should still be 3. | ||
| // With AND this would become 0, so this test guards the default operator behavior. | ||
| TestSearcher("sv", "region thistextdoesnotexist", 3); | ||
| } |
Member
There was a problem hiding this comment.
Interesting, so this should also be true?
TestSearcher("sv", "region AND thistextdoesnotexist", 0);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



The default operator in LuceneSearcher is now OR, allowing queries to match documents with any of the terms. Added unit test SearchUsesOrAsDefaultOperator to verify this behavior.