Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a34265f
Move composite aggregation to aggregations module.
martijnvg Oct 16, 2022
fb61f2d
spotless
martijnvg Oct 18, 2022
609aa41
allow rate tests to use aggs in aggregation module
martijnvg Oct 18, 2022
4dfe728
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Oct 18, 2022
486b63c
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Oct 18, 2022
2abd2c9
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Oct 19, 2022
bda2b45
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Oct 24, 2022
92f2486
updated dependencies
martijnvg Oct 24, 2022
9540a43
fixed test compile issue after merging in master
martijnvg Oct 24, 2022
138412c
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Oct 31, 2022
b2dacbf
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Nov 4, 2022
fbec791
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Nov 7, 2022
1cb4b99
Fix up plugin descriptor dependencies
ChrisHegarty Nov 7, 2022
518819f
fix core serialization tests by taking aggregation plugin into accoun…
martijnvg Nov 7, 2022
5ae9f0c
spotless
martijnvg Nov 7, 2022
f284c42
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Nov 7, 2022
48edb55
Merge remote-tracking branch 'es/main' into move_composite_to_module
martijnvg Jan 4, 2023
25c21c4
fix precommit issues after merging in main
martijnvg Jan 4, 2023
511f18b
fix eql precommit issues after merging in main
martijnvg Jan 4, 2023
bf60a75
fix sql precommit issues after merging in main
martijnvg Jan 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import org.elasticsearch.action.search.SearchScrollRequest;
import org.elasticsearch.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder;
import org.elasticsearch.aggregations.bucket.adjacency.ParsedAdjacencyMatrix;
import org.elasticsearch.aggregations.bucket.composite.CompositeAggregationBuilder;
import org.elasticsearch.aggregations.bucket.composite.ParsedComposite;
import org.elasticsearch.aggregations.bucket.histogram.AutoDateHistogramAggregationBuilder;
import org.elasticsearch.aggregations.bucket.histogram.ParsedAutoDateHistogram;
import org.elasticsearch.aggregations.bucket.timeseries.ParsedTimeSeries;
Expand All @@ -45,8 +47,6 @@
import org.elasticsearch.rest.RestResponse;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.bucket.composite.CompositeAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.composite.ParsedComposite;
import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.filter.FiltersAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.filter.ParsedFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.action.support.ListenableActionFuture;
import org.elasticsearch.aggregations.AggregationsPlugin;
import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.time.DateFormatter;
Expand All @@ -22,6 +23,7 @@
import org.elasticsearch.index.IndexMode;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.mapper.DateFieldMapper;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.search.aggregations.MultiBucketConsumerService;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.MapMatcher;
Expand All @@ -32,6 +34,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -51,6 +54,11 @@ public class TimeSeriesMetricsIT extends ESIntegTestCase {
private static final int MAX_RESULT_WINDOW = IndexSettings.MAX_RESULT_WINDOW_SETTING.getDefault(Settings.EMPTY);
private static final DateFormatter FORMATTER = DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER;

@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return List.of(AggregationsPlugin.class);
}

public void testKeywordDimension() throws Exception {
assertSmallSimple("a", "b", mapping -> mapping.field("type", "keyword"));
}
Expand Down
3 changes: 3 additions & 0 deletions modules/aggregations/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
requires org.elasticsearch.server;
requires org.elasticsearch.xcontent;
requires org.apache.lucene.core;
requires org.apache.logging.log4j;
requires org.elasticsearch.logging;

exports org.elasticsearch.aggregations.bucket.histogram;
exports org.elasticsearch.aggregations.bucket.adjacency;
exports org.elasticsearch.aggregations.bucket.timeseries;
exports org.elasticsearch.aggregations.bucket.composite;
exports org.elasticsearch.aggregations.pipeline;
exports org.elasticsearch.aggregations.metric;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import org.elasticsearch.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder;
import org.elasticsearch.aggregations.bucket.adjacency.InternalAdjacencyMatrix;
import org.elasticsearch.aggregations.bucket.composite.CompositeAggregationBuilder;
import org.elasticsearch.aggregations.bucket.composite.InternalComposite;
import org.elasticsearch.aggregations.bucket.histogram.AutoDateHistogramAggregationBuilder;
import org.elasticsearch.aggregations.bucket.histogram.InternalAutoDateHistogram;
import org.elasticsearch.aggregations.bucket.timeseries.InternalTimeSeries;
Expand All @@ -24,6 +26,7 @@
import org.elasticsearch.aggregations.pipeline.MovFnPipelineAggregationBuilder;
import org.elasticsearch.aggregations.pipeline.MovingFunctionScript;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.plugins.ExtensiblePlugin;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.plugins.ScriptPlugin;
import org.elasticsearch.plugins.SearchPlugin;
Expand All @@ -32,7 +35,7 @@
import java.util.ArrayList;
import java.util.List;

public class AggregationsPlugin extends Plugin implements SearchPlugin, ScriptPlugin {
public class AggregationsPlugin extends Plugin implements ExtensiblePlugin, SearchPlugin, ScriptPlugin {
Copy link
Member

Choose a reason for hiding this comment

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

Do we use ExtensiblePlugin yet?

@Override
public List<AggregationSpec> getAggregations() {
List<AggregationSpec> specs = new ArrayList<>();
Expand All @@ -51,6 +54,11 @@ public List<AggregationSpec> getAggregations() {
).addResultReader(InternalAutoDateHistogram::new)
.setAggregatorRegistrar(AutoDateHistogramAggregationBuilder::registerAggregators)
);
specs.add(
new AggregationSpec(CompositeAggregationBuilder.NAME, CompositeAggregationBuilder::new, CompositeAggregationBuilder.PARSER)
.addResultReader(InternalComposite::new)
.setAggregatorRegistrar(CompositeAggregationBuilder::registerAggregators)
);
specs.add(
new AggregationSpec(MatrixStatsAggregationBuilder.NAME, MatrixStatsAggregationBuilder::new, new MatrixStatsParser())
.addResultReader(InternalMatrixStats::new)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
import org.elasticsearch.xcontent.XContentBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.Version;
import org.elasticsearch.common.io.stream.StreamInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.search.aggregations.Aggregator;
import org.elasticsearch.search.aggregations.AggregatorFactories;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.DocValues;
import org.apache.lucene.index.LeafReaderContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.Version;
import org.elasticsearch.common.io.stream.StreamInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.elasticsearch.common.util.BigArrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.Version;
import org.elasticsearch.common.ParsingException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.common.Rounding;
import org.elasticsearch.common.util.BigArrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.elasticsearch.Version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.elasticsearch.common.geo.GeoBoundingBox;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.SortedNumericDocValues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.SortedNumericDocValues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.elasticsearch.common.io.stream.StreamInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.PriorityQueue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.document.IntPoint;
import org.apache.lucene.document.LongPoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.elasticsearch.search.aggregations.ParsedMultiBucketAggregation;
import org.elasticsearch.xcontent.ObjectParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.PointValues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.SortedNumericDocValues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.DocIdSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.PostingsEnum;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

package org.elasticsearch.search.aggregations.bucket.composite;
package org.elasticsearch.aggregations.bucket.composite;

import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.aggregations.bucket.composite.CompositeAggregationBuilder;
import org.elasticsearch.aggregations.bucket.composite.CompositeValuesSourceBuilder;
import org.elasticsearch.aggregations.bucket.composite.InternalComposite;
import org.elasticsearch.aggregations.bucket.composite.TermsValuesSourceBuilder;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.common.document.DocumentField;
import org.elasticsearch.common.settings.Settings;
Expand All @@ -31,10 +35,6 @@
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.AggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.composite.CompositeAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.composite.CompositeValuesSourceBuilder;
import org.elasticsearch.search.aggregations.bucket.composite.InternalComposite;
import org.elasticsearch.search.aggregations.bucket.composite.TermsValuesSourceBuilder;
import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.filter.InternalFilter;
import org.elasticsearch.search.aggregations.metrics.InternalTopHits;
Expand Down
Loading