Skip to content
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

Use newIndexSearcher() to avoid incompatible readers in AggregatorTestCase#testSupportedFieldTypes #52723

Merged

Conversation

polyfractal
Copy link
Contributor

Lucene's newSearcher() can generate readers like ParallelCompositeReader which we can't use. We need to instead use our helper newIndexSearcher().

Fixes #52681

Lucene's `newSearcher()` can generate readers like ParallelCompositeReader
which we can't use.  We need to instead use our helper `newIndexSearcher`
@polyfractal polyfractal added :Analytics/Aggregations Aggregations >test-failure Triaged test failures from CI labels Feb 24, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

LGTM.

@polyfractal polyfractal merged commit 9b48d6f into elastic:master Feb 24, 2020
polyfractal added a commit to polyfractal/elasticsearch that referenced this pull request Mar 30, 2020
Lucene's `newSearcher()` can generate readers like ParallelCompositeReader
which we can't use.  We need to instead use our helper `newIndexSearcher`
polyfractal added a commit that referenced this pull request Mar 31, 2020
…nations (#54451)

* Comprehensively test supported/unsupported field type:agg combinations (#52493)

This adds a test to AggregatorTestCase that allows us to programmatically
verify that an aggregator supports or does not support a particular
field type.  It fetches the list of registered field type parsers,
creates a MappedFieldType from the parser and then attempts to run
a basic agg against the field.

A supplied list of supported VSTypes are then compared against the
output (success or exception) and suceeds or fails the test accordingly.

Co-Authored-By: Mark Tozzi <[email protected]>
* Skip fields that are not aggregatable

* Use newIndexSearcher() to avoid incompatible readers (#52723)

Lucene's `newSearcher()` can generate readers like ParallelCompositeReader
which we can't use.  We need to instead use our helper `newIndexSearcher`
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.

[CI] TermsAggregatorTests.testSupportedFieldTypes fails reproducibly
4 participants