Skip to content

Allow to paginate $search aggregation with searchBefore and searchAfter markers #2764

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

Open
wants to merge 4 commits into
base: 2.12.x
Choose a base branch
from

Conversation

bitgandtter
Copy link

Q A
Type feature
BC Break no
Fixed issues NA

Summary

feat: allow to paginate search aggregation with searchBefore and searchAfter markers

Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing this feature; the implementation looks good.
But I think we can reduce the testing load.

Comment on lines 1317 to 1333
#[DataProvider('provideAutocompleteBuilders')]
#[DataProvider('provideCompoundBuilders')]
#[DataProvider('provideEmbeddedDocumentBuilders')]
#[DataProvider('provideEmbeddedDocumentCompoundBuilders')]
#[DataProvider('provideEqualsBuilders')]
#[DataProvider('provideExistsBuilders')]
#[DataProvider('provideGeoShapeBuilders')]
#[DataProvider('provideGeoWithinBuilders')]
#[DataProvider('provideMoreLikeThisBuilders')]
#[DataProvider('provideNearBuilders')]
#[DataProvider('providePhraseBuilders')]
#[DataProvider('provideQueryStringBuilders')]
#[DataProvider('provideRangeBuilders')]
#[DataProvider('provideRegexBuilders')]
#[DataProvider('provideTextBuilders')]
#[DataProvider('provideWildcardBuilders')]
public function testSearchOperatorsWithSearchBefore(array $expectedOperator, Closure $createOperator): void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a single case is sufficient to test this feature. As it is, you're simply repeating the same test many times over for no purpose.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the advice. I leave only one data provider on each method

@GromNaN GromNaN changed the base branch from 2.11.x to 2.12.x May 6, 2025 14:43
@GromNaN GromNaN changed the title Allow to paginate search aggregation with searchBefore and searchAfter markers Allow to paginate $search aggregation with searchBefore and searchAfter markers May 6, 2025
@GromNaN GromNaN added this to the 2.12.0 milestone May 6, 2025
@GromNaN GromNaN added the Feature label May 6, 2025
@bitgandtter bitgandtter requested a review from GromNaN May 14, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants