summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/search/aggregations/metrics
AgeCommit message (Collapse)Author
2017-06-29Remove QueryParseContext from parsing QueryBuilders (#25448)Christoph Büscher
Currently QueryParseContext is only a thin wrapper around an XContentParser that adds little functionality of its own. I provides helpers for long deprecated field names which can be removed and two helper methods that can be made static and moved to other classes. This is a first step in helping to remove QueryParseContext entirely.
2017-06-22Upgrade to lucene-7.0.0-snapshot-ad2cb77. (#25349)Adrien Grand
Most notable changes: - better update concurrency: LUCENE-7868 - TopDocs.totalHits is now a long: LUCENE-7872 - QueryBuilder does not remove the boolean query around multi-term synonyms: LUCENE-7878 - removal of Fields: LUCENE-7500 For the `TopDocs.totalHits` change, this PR relies on the fact that the encoding of vInts and vLongs are compatible: you can write and read with any of them as long as the value can be represented by a positive int.
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-06-14Add more missing AggregationBuilder getters (#25198)Zachary Tong
* Add more missing AggregationBuilder getters - getMetadata for all aggs - various getters on TermsAggBuilder (without "get" prefix to maintain convention) - Also makes InternalSum's ctor public, to follow suit of other metrics (min/max/avg/etc)
2017-06-07Scripting: Remove unnecessary intermediate script compilation methods on ↵Ryan Ernst
QueryShardContext (#25093) This commit removes wrapper methods on QueryShardContext used to compile scripts. Instead, the script service is made accessible in the context, and calls to compile can be made directly. This will ease transition to each of those location becoming their own context, since they would no longer be able to expect the same script class type.
2017-05-30Scripting: Add StatefulFactoryType as optional intermediate factory in ↵Ryan Ernst
script contexts (#24974) ScriptContexts currently understand a FactoryType that can produce instances of the script InstanceType. However, for search scripts, this does not work as we have the concept of LeafSearchScript that is created per lucene segment. This commit effectively renames the existing SearchScript class into SearchScript.LeafFactory, which is a new, optional, class that can be defined within a ScriptContext. LeafSearchScript is effectively renamed back into SearchScript. This change allows the model of stateless factory -> stateful factory -> script instance to continue, but in a generic way that any script context may take advantage of. relates #20426
2017-05-26Scripting: Rename CompiledType to FactoryType in ScriptContext (#24897)Ryan Ernst
This commit renames the concept of the "compiled type" to a "factory type", along with all implementations of this class to be named Factory. This brings it inline with the classes purpose.
2017-05-25Scripting: Move context definitions to instance type classes (#24883)Ryan Ernst
This is a simple refactoring to move the context definitions into the type that they use. While we have multiple context names for the same class at the moment, this will eventually become one ScriptContext per instance type, so the pattern of a static member on the interface called CONTEXT can be used. This commit also moves the consolidated list of contexts provided by core ES into ScriptModule.
2017-05-24Scripting: Add instance and compiled classes to script contexts (#24868)Ryan Ernst
This commit modifies the compile method of ScriptService to be context aware. The ScriptContext is now a generic class which contains both the instance type and compiled type for a script. Instance type may be stateful (for example, pre loading field information for the index a script will execute on, like in expressions), while the compiled type is stateless and used to construct instance type instances. This change is only a first step to cutover ScriptService to the new paradigm. It only converts callers to the script service, and has a small shim to wrap compilation from the script engines to support the current two fixed instance types, SearchScript and ExecutableScript.
2017-05-23Use ParseField constants in ParsedGeoBounds (#24849)Christoph Büscher
2017-05-22Scripting: Simplify ScriptContext (#24818)Ryan Ernst
As we work towards contexts implying the return type of compilation, we first need ScriptContext to not be an enum. This commit removes the Standard enum and Plugin subclass of ScriptContext.
2017-05-19Remove //norelease and cleans up somet aggregations tests (#24789)Tanguy Leroux
2017-05-18Fix checkstyle violation in ParsedScriptedMetricTanguy Leroux
2017-05-18Add parsing method for Top Hits aggregation (#24717)Tanguy Leroux
Related to #23331
2017-05-17Add parsing for InternalScriptedMetric aggregation (#24738)Christoph Büscher
2017-05-10Fix merging conflictsTanguy Leroux
2017-05-10Add parsing for String/Long/Double Terms aggregations (#24521)Tanguy Leroux
2017-05-05Merge remote-tracking branch 'origin/master' into feature/client_aggs_parsingTanguy Leroux
2017-05-04Add StreamInput.readEnum and StreamOutput.writeEnum (#24475)Igor Motov
Implements the common enum serialization/deserialization pattern for enumeration on the StreamInput/StreamOutput.
2017-05-03Merge branch 'master' into feature/client_aggs_parsingjavanna
2017-05-02Allow scripted metric agg to access `_score` (#24295)Winston Ewert
* Fixes #24259 Corrects the ScriptedMetricAggregator so that the script can have access to scores during the map stage. * Restored original tests. Added seperate test. As requested, I've restored the non-score dependant tests, and added the score dependent metric as a seperate test.
2017-04-28Add parsing for InternalGeoCentroid (#24371)Christoph Büscher
2017-04-28Don't render InternalGeoCentroid in static helper methodChristoph Büscher
This was introduced by a previous commit but is not necessary.
2017-04-28Merge branch 'master' into feature/client_aggs_parsingChristoph Büscher
2017-04-28Add `count` value to rest output of `geo_centroid` (#24387)Christoph Büscher
Currently we don't write the count value to the geo_centroid aggregation rest response, but it is provided via the java api and the count() method in the GeoCentroid interface. We should add this parameter to the rest output and also provide it via the getProperty() method.
2017-04-28Fixing checktyle error for modifier orderChristoph Büscher
2017-04-28Add parsing for InternalGeoBounds (#24365)Christoph Büscher
2017-04-27Add parsing for InternalPercentilesBucket (#24330)Christoph Büscher
2017-04-27Fixed another sneaky LineLength violationChristoph Büscher
2017-04-26Merge branch 'master' into feature/client_aggs_parsingChristoph Büscher
2017-04-26Fix order of static field declarations for parserChristoph Büscher
2017-04-26Add parsing for InternalStatsBucket and InternalExtendedStatsBucket (#24312)Christoph Büscher
2017-04-26Removal of dead code in ScriptedMetricAggregationBuilder (#24346)Koen De Groote
This code removes a few lines of dead code from ScriptedMetricAggregationBuilder. Just completely dead code, it adds things to a Set that is then not used in any way.
2017-04-26Correcting 140 character line lengthChristoph Büscher
2017-04-25Add parsing for InternalExtendedStats (#24284)Christoph Büscher
2017-04-25Add parsing for InternalStats (#24239)Christoph Büscher
2017-04-24Merge branch 'master' into feature/client_aggs_parsingChristoph Büscher
2017-04-24Remove getCountAsString() from InternalStats and Stats interface (#24291)Christoph Büscher
The `count` value in the stats aggregation represents a simple doc count that doesn't require a formatted version. We didn't render an "as_string" version for count in the rest response, so the method should also be removed in favour of just using String.valueOf(getCount()) if a string version of the count is needed. Closes #24287
2017-04-24[TEST] Added unittests for InternalGeoCentroidMartijn van Groningen
Relates to #22278
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-20Align behavior or HDR percentiles iterator with percentile() method (#24206)Tanguy Leroux
2017-04-20Add parsing methods for Percentiles aggregations (#24183)Tanguy Leroux
2017-04-19Add parsing for InternalSimpleValue and InternalDerivative (#24162)Christoph Büscher
2017-04-19Fix checkstyle violationTanguy 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-18Minor changes in ParsedCardinalityChristoph Büscher
2017-04-18Adding parsing for InternalValueCountChristoph Büscher
2017-04-18Adding parsing for InternalAvgChristoph Büscher
2017-04-18Adding parsing for InternalSumChristoph Büscher
2017-04-18Adding parsing for InternalMax and InternalMinChristoph Büscher