Skip to content

Extend ISearchBuilder to support grouping clauses#7850

Merged
sebastienros merged 2 commits into
OrchardCMS:devfrom
ryanwawr:dev
Sep 21, 2017
Merged

Extend ISearchBuilder to support grouping clauses#7850
sebastienros merged 2 commits into
OrchardCMS:devfrom
ryanwawr:dev

Conversation

@ryanwawr

@ryanwawr ryanwawr commented Sep 14, 2017

Copy link
Copy Markdown
Contributor

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.

@dnfclas

dnfclas commented Sep 14, 2017

Copy link
Copy Markdown

@ryanwawr,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla2.dotnetfoundation.org.

It will cover your contributions to all .NET Foundation-managed open source projects.
Thanks,
.NET Foundation Pull Request Bot

@dnfclas

dnfclas commented Sep 14, 2017

Copy link
Copy Markdown

@ryanwawr, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.

Thanks, .NET Foundation Pull Request Bot

@sebastienros

Copy link
Copy Markdown
Member

That looks good, can you just add some unit tests to at least demonstrate the usage?

@ryanwawr

Copy link
Copy Markdown
Contributor Author

Added two unit tests verifying simple grouped clauses and nested grouped clauses.

@sebastienros
sebastienros merged commit 521087d into OrchardCMS:dev Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants