summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles
AgeCommit message (Collapse)Author
2017-06-17[Tests] Check that parsing aggregations works in a forward compatible way ↵Christoph Büscher
(#25219) This change adds tests for the aggregation parsing that try to simulate that we can parse existing aggregations in a forward compatible way in the future, ignoring potential newly added fields or substructures to the xContent response.
2017-05-17Merge branch 'master' into feature/client_aggs_parsingjavanna
2017-05-16Automatically close releasables after test (#24687)Zachary Tong
This moves the releasing logic to the base test, so that individual test cases don't need to worry about releasing the aggregators. It's not a big deal for individual aggs, but once tests start using sub-aggs, it can become tricky to free (without double-freeing) all the aggregators.
2017-05-10Fix merging conflictsTanguy Leroux
2017-05-10Merge remote-tracking branch 'origin/master' into feature/client_aggs_parsingTanguy Leroux
# Conflicts: # core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/InternalTermsTestCase.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalExtendedStatsTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalMaxTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalStatsTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/avg/InternalAvgTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/cardinality/InternalCardinalityTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/geobounds/InternalGeoBoundsTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/geocentroid/InternalGeoCentroidTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/min/InternalMinTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles/InternalPercentilesTestCase.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles/hdr/InternalHDRPercentilesRanksTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles/tdigest/InternalTDigestPercentilesRanksTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/sum/InternalSumTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/valuecount/InternalValueCountTests.java # core/src/test/java/org/elasticsearch/search/aggregations/pipeline/InternalSimpleValueTests.java # core/src/test/java/org/elasticsearch/search/aggregations/pipeline/bucketmetrics/percentile/InternalPercentilesBucketTests.java # core/src/test/java/org/elasticsearch/search/aggregations/pipeline/derivative/InternalDerivativeTests.java # test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java
2017-05-10Added unit tests for InternalMatrixStats.Martijn van Groningen
Also moved InternalAggregationTestCase to test-framework module in order to make use of it from other modules than core. Relates to #22278
2017-05-09[TEST] Add test for Aggregations#fromXContent (#24524)Luca Cavanna
AggregationsTests#testFromXContent verifies that parsing of aggregations works by combining multiple aggs at the same level, and also adding sub-aggregations to multi bucket and single bucket aggs, up to a maximum depth of 5.
2017-05-02Merge branch 'master' into feature/client_aggs_parsingjavanna
2017-05-02[Test] Add unit tests for HDR/TDigest PercentilesAggregators (#24245)Tanguy Leroux
Relates to #22278
2017-04-27Add parsing for InternalPercentilesBucket (#24330)Christoph Büscher
2017-04-26Merge branch 'master' into feature/client_aggs_parsingChristoph Büscher
2017-04-26InternalPercentilesBucket should not rely on ordered percents array (#24336)Christoph Büscher
Currently InternalPercentilesBucket#percentile() relies on the percent array passed in to be in sorted order. This changes the aggregation to store an internal lookup table that is constructed from the percent/percentiles arrays passed in that can be used to look up the percentile values. Closes #24331
2017-04-20[Test] Expose AbstractPercentilesTestCase.randomPercents()Tanguy Leroux
2017-04-20Merge remote-tracking branch 'origin/master' into feature/client_aggs_parsingTanguy Leroux
# Conflicts: # core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles/InternalPercentilesTestCase.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/percentiles/hdr/InternalHDRPercentilesTests.java
2017-04-20 [Test] Always check the XContent equivalent when parsing aggregations (#24208)Tanguy Leroux
In InternalAggregationTestCase, we can check that the internal aggregation and the parsed aggregation always produce the same XContent even if the original internal aggregation has been shuffled or not.
2017-04-20Align behavior or HDR percentiles iterator with percentile() method (#24206)Tanguy Leroux
2017-04-20Remove @Repeat(iterations = 1000) in testsTanguy Leroux
2017-04-20Add parsing methods for Percentiles aggregations (#24183)Tanguy Leroux
2017-04-19Merge remote-tracking branch 'origin/master' into feature/client_aggs_parsingTanguy Leroux
# Conflicts: # core/src/main/java/org/elasticsearch/search/DocValueFormat.java # core/src/test/java/org/elasticsearch/search/aggregations/InternalAggregationTestCase.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalMaxTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/avg/InternalAvgTests.java # core/src/test/java/org/elasticsearch/search/aggregations/metrics/min/InternalMinTests.java
2017-04-19[Test] Add unit tests for InternalHDRPercentilesTests (#24157)Tanguy Leroux
Related to #22278
2017-04-18AbstractParsedPercentiles should use Percentile class (#24160)Tanguy Leroux
Now the Percentile interface has been merged with the InternalPercentile class in core (#24154) the AbstractParsedPercentiles should use it. This commit also changes InternalPercentilesRanksTestCase so that it now tests the iterator obtained from parsed percentiles ranks aggregations. Adding this new test raised an issue in the iterators where key and value are "swapped" in internal implementations when building the iterators (see InternalTDigestPercentileRanks.Iter constructor that accepts the `keys` as the first parameter named `values`, each key being mapped to the `value` field of Percentile class). This is because percentiles ranks aggs inverts percentiles/values compared to the percentiles aggs. * Add assume in InternalAggregationTestCase * Update after Luca review
2017-04-18Merge remote-tracking branch 'origin/master' into feature/client_aggs_parsingTanguy Leroux
2017-04-18Add parsing for percentiles ranks (#23974)Tanguy Leroux
This commit adds the logic for parsing the percentiles ranks aggregations.
2017-04-18[Test] Add unit tests for InternalTDigestPercentilesTests (#24090)Tanguy Leroux
2017-03-01Add unit tests to percentile ranks aggregations. (#23240)Adrien Grand
Relates #22278
2016-07-01Clean up BytesReference (#19196)Simon Willnauer
BytesReference should be a really simple interface, yet it has a gazillion ways to achieve the same this. Methods like `#hasArray`, `#toBytesArray`, `#copyBytesArray` `#toBytesRef` `#bytes` are all really duplicates. This change simplifies the interface dramatically and makes implementations of it much simpler. All array access has been removed and is streamlined through a single `#toBytesRef` method. Utility methods to materialize a compact byte array has been added too for convenience.
2016-04-21Remove readFrom from org.elasticsearch.searchNik Everett
Replace with a constructor that takes StreamInput or a static method. In one case (ValuesSourceType) we no longer need to serialize the data at all! Relates to #17085
2016-01-26Removes Aggregation Builders in place of AggregatorFactory implementationsColin Goodheart-Smithe