Extend ISearchBuilder to support grouping clauses#7850
Merged
Conversation
|
@ryanwawr, It will cover your contributions to all .NET Foundation-managed open source projects. |
|
@ryanwawr, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request. |
Member
|
That looks good, can you just add some unit tests to at least demonstrate the usage? |
Contributor
Author
|
Added two unit tests verifying simple grouped clauses and nested grouped clauses. |
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.
Based on DamienLaw's suggested changes in #5764. Needed clause-grouping functionality for a project I'm developing, so implemented these changes and performed some rudimentary testing. Can confirm that this works for simple groups such as Clause A AND (Clause B OR Clause C). Have not tested nesting groups within each other, but I see no reason why that wouldn't work as well.
Would be nice to see this merged soon, as it significantly expands the range of queries that can be constructed with the ISearchBuilder interface.
Not sure if this is necessary, but to be sure I'm in compliance with the CLA:
Submission containing materials of a third party: DamienLaw. Code was offered as a suggested improvement in #5764, and I am not aware of any licenses restricting its use.