-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Collapse DSL to QueryBuilder #1724
Conversation
CHANGELOG.md
Outdated
@@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file based on the | |||
* Launch tests with PHP 7.4 | |||
* Added `nullable_type_declaration_for_default_null_value`, `no_alias_functions` CS rules [#1706](https://github.com/ruflin/Elastica/pull/1706) | |||
* Configured `visibility_required` CS rule for constants [#1723](https://github.com/ruflin/Elastica/pull/1723) | |||
* Added `Collapse` DSL to `QueryBuilder` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment, but it would be perfect if you add the link to the PR ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks :)
@@ -2,7 +2,7 @@ | |||
|
|||
namespace Elastica\QueryBuilder\DSL; | |||
|
|||
use Elastica\Query\InnerHits; | |||
use Elastica\Collapse\InnerHits; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch
@wackerl91 Thanks for the contribution and cleanup! |
That's going to be a bit awkward now: in the PR that added Field Collapsing Support (#1653) I forgot to check in the DSL classes, which made working with it a bit clumsy compared to the usual query methods.
I.e. - as with aggregations - it's now possible to do stuff like this:
Let me know if there need to be any changes. Cheers :)