Skip to content

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

Merged
polyfractal merged 1 commit intoelastic:masterfrom
polyfractal:fix_aggtestcase_indexsearcher
Feb 24, 2020
Merged

Use newIndexSearcher() to avoid incompatible readers in AggregatorTestCase#testSupportedFieldTypes#52723
polyfractal merged 1 commit intoelastic:masterfrom
polyfractal:fix_aggtestcase_indexsearcher

Conversation

@polyfractal
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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 pushed 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 pushed 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 <mark.tozzi@gmail.com>
* 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