From 86f8dd65a45810ae671ee1f607a2d5287649d66b Mon Sep 17 00:00:00 2001 From: Nick Knize Date: Wed, 11 May 2022 12:52:28 -0500 Subject: [PATCH] [Javadocs] add to internal classes in o.o.http, indices, and search (#3288) Adds javadocs to internal classes in org.opensearch.http, indices, and search packages. Signed-off-by: Nicholas Walter Knize --- .../src/main/java/org/opensearch/Build.java | 5 ++ .../java/org/opensearch/http/CorsHandler.java | 5 ++ .../java/org/opensearch/http/HttpRequest.java | 5 ++ .../indices/IndexingMemoryController.java | 5 ++ .../opensearch/indices/IndicesQueryCache.java | 10 +++ .../indices/IndicesRequestCache.java | 10 +++ .../opensearch/indices/IndicesService.java | 17 +++++ .../opensearch/indices/NodeIndicesStats.java | 5 ++ .../analysis/PreBuiltCacheFactory.java | 11 +++ .../breaker/AllCircuitBreakerStats.java | 5 ++ .../indices/breaker/CircuitBreakerStats.java | 5 ++ .../HierarchyCircuitBreakerService.java | 10 +++ .../cluster/IndicesClusterStateService.java | 20 ++++++ .../cache/IndicesFieldDataCache.java | 12 ++++ .../indices/recovery/MultiChunkTransfer.java | 10 +++ .../indices/recovery/MultiFileWriter.java | 5 ++ .../recovery/PeerRecoverySourceService.java | 5 ++ .../recovery/PeerRecoveryTargetService.java | 10 +++ .../recovery/RecoveriesCollection.java | 2 + .../recovery/RecoverySourceHandler.java | 20 ++++++ .../indices/recovery/RecoveryState.java | 20 ++++++ .../common/ReplicationLuceneIndex.java | 12 ++++ .../indices/store/IndicesStore.java | 10 +++ .../TransportNodesListShardStoreMetadata.java | 30 ++++++++ .../org/opensearch/search/DocValueFormat.java | 10 +++ .../java/org/opensearch/search/SearchHit.java | 7 ++ .../org/opensearch/search/SearchHits.java | 5 ++ .../org/opensearch/search/SearchService.java | 5 ++ .../aggregations/AggregationBuilder.java | 8 ++- .../search/aggregations/Aggregator.java | 10 ++- .../aggregations/AggregatorFactories.java | 2 + .../aggregations/CardinalityUpperBound.java | 2 + .../aggregations/InternalAggregation.java | 7 ++ .../aggregations/InternalAggregations.java | 5 ++ .../InternalMultiBucketAggregation.java | 5 ++ .../search/aggregations/InternalOrder.java | 10 +++ .../aggregations/MultiBucketCollector.java | 5 ++ .../MultiBucketConsumerService.java | 7 ++ .../ParsedMultiBucketAggregation.java | 5 ++ .../PipelineAggregationBuilder.java | 15 ++++ .../bucket/BestBucketsDeferringCollector.java | 5 ++ .../bucket/BucketsAggregator.java | 20 ++++++ .../bucket/DeferringBucketCollector.java | 5 ++ .../adjacency/AdjacencyMatrixAggregator.java | 5 ++ .../adjacency/InternalAdjacencyMatrix.java | 6 ++ .../adjacency/ParsedAdjacencyMatrix.java | 5 ++ .../composite/CompositeAggregation.java | 5 ++ .../bucket/composite/CompositeAggregator.java | 5 ++ .../CompositeValuesSourceConfig.java | 5 ++ .../DateHistogramValuesSourceBuilder.java | 5 ++ .../GeoTileGridValuesSourceBuilder.java | 5 ++ .../HistogramValuesSourceBuilder.java | 5 ++ .../bucket/composite/InternalComposite.java | 15 ++++ .../bucket/composite/ParsedComposite.java | 5 ++ .../composite/TermsValuesSourceBuilder.java | 6 +- .../bucket/filter/FiltersAggregator.java | 5 ++ .../bucket/filter/InternalFilters.java | 5 ++ .../bucket/filter/ParsedFilters.java | 5 ++ .../bucket/geogrid/CellIdSource.java | 2 + .../geogrid/GeoGridAggregationBuilder.java | 5 ++ .../AutoDateHistogramAggregationBuilder.java | 5 ++ .../AutoDateHistogramAggregator.java | 4 ++ .../bucket/histogram/DateIntervalWrapper.java | 5 ++ .../histogram/InternalAutoDateHistogram.java | 15 ++++ .../histogram/InternalDateHistogram.java | 10 +++ .../bucket/histogram/InternalHistogram.java | 10 +++ .../InternalVariableWidthHistogram.java | 15 ++++ .../histogram/ParsedAutoDateHistogram.java | 5 ++ .../bucket/histogram/ParsedDateHistogram.java | 5 ++ .../bucket/histogram/ParsedHistogram.java | 5 ++ .../ParsedVariableWidthHistogram.java | 5 ++ .../bucket/missing/InternalMissing.java | 5 ++ .../bucket/nested/NestedAggregator.java | 5 ++ .../nested/NestedAggregatorFactory.java | 5 ++ .../ReverseNestedAggregatorFactory.java | 5 ++ .../bucket/range/BinaryRangeAggregator.java | 15 ++++ .../range/GeoDistanceAggregationBuilder.java | 5 ++ .../GeoDistanceRangeAggregatorFactory.java | 5 ++ .../bucket/range/InternalBinaryRange.java | 5 ++ .../bucket/range/InternalDateRange.java | 10 +++ .../bucket/range/InternalGeoDistance.java | 10 +++ .../bucket/range/InternalRange.java | 10 +++ .../range/IpRangeAggregationBuilder.java | 5 ++ .../bucket/range/ParsedBinaryRange.java | 5 ++ .../bucket/range/ParsedDateRange.java | 5 ++ .../bucket/range/ParsedGeoDistance.java | 5 ++ .../bucket/range/ParsedRange.java | 5 ++ .../bucket/range/RangeAggregator.java | 10 +++ .../bucket/sampler/SamplerAggregator.java | 5 ++ .../bucket/terms/BytesKeyedBucketOrds.java | 6 ++ .../bucket/terms/DoubleTerms.java | 5 ++ .../GlobalOrdinalsStringTermsAggregator.java | 9 +++ .../bucket/terms/IncludeExclude.java | 59 ++++++++++++++-- .../bucket/terms/InternalMultiTerms.java | 4 ++ .../bucket/terms/InternalRareTerms.java | 7 ++ .../terms/InternalSignificantTerms.java | 7 ++ .../bucket/terms/InternalTerms.java | 12 ++++ .../bucket/terms/LongKeyedBucketOrds.java | 6 ++ .../bucket/terms/LongRareTerms.java | 5 ++ .../aggregations/bucket/terms/LongTerms.java | 5 ++ .../terms/MapStringTermsAggregator.java | 9 +++ .../terms/MultiTermsAggregationFactory.java | 5 ++ .../bucket/terms/MultiTermsAggregator.java | 4 ++ .../bucket/terms/ParsedDoubleTerms.java | 5 ++ .../bucket/terms/ParsedLongRareTerms.java | 5 ++ .../bucket/terms/ParsedLongTerms.java | 5 ++ .../bucket/terms/ParsedMultiTerms.java | 5 ++ .../bucket/terms/ParsedRareTerms.java | 5 ++ .../terms/ParsedSignificantLongTerms.java | 5 ++ .../terms/ParsedSignificantStringTerms.java | 5 ++ .../bucket/terms/ParsedSignificantTerms.java | 5 ++ .../bucket/terms/ParsedStringRareTerms.java | 5 ++ .../bucket/terms/ParsedStringTerms.java | 5 ++ .../bucket/terms/ParsedTerms.java | 5 ++ .../aggregations/bucket/terms/RareTerms.java | 2 + .../terms/RareTermsAggregatorFactory.java | 5 ++ .../bucket/terms/SignificantLongTerms.java | 5 ++ .../bucket/terms/SignificantStringTerms.java | 5 ++ .../bucket/terms/SignificantTerms.java | 5 ++ .../SignificantTermsAggregatorFactory.java | 5 ++ .../SignificantTextAggregatorFactory.java | 5 ++ .../bucket/terms/StringRareTerms.java | 5 ++ .../bucket/terms/StringTerms.java | 5 ++ .../aggregations/bucket/terms/Terms.java | 2 + .../bucket/terms/TermsAggregator.java | 5 ++ .../bucket/terms/TermsAggregatorFactory.java | 5 ++ .../bucket/terms/UnmappedRareTerms.java | 5 ++ .../terms/UnmappedSignificantTerms.java | 2 + .../bucket/terms/UnmappedTerms.java | 2 + .../bucket/terms/heuristic/ChiSquare.java | 5 ++ .../bucket/terms/heuristic/GND.java | 5 ++ .../bucket/terms/heuristic/JLHScore.java | 5 ++ .../terms/heuristic/MutualInformation.java | 5 ++ .../heuristic/NXYSignificanceHeuristic.java | 10 +++ .../terms/heuristic/PercentageScore.java | 5 ++ .../terms/heuristic/ScriptHeuristic.java | 13 +++- .../metrics/AbstractHyperLogLog.java | 6 +- .../metrics/AbstractLinearCounting.java | 6 +- .../metrics/CardinalityAggregator.java | 37 ++++++++++ .../aggregations/metrics/ExtendedStats.java | 5 ++ .../ExtendedStatsAggregatorProvider.java | 2 + .../metrics/HyperLogLogPlusPlus.java | 20 ++++++ .../metrics/HyperLogLogPlusPlusSparse.java | 10 +++ .../metrics/InternalExtendedStats.java | 10 +++ .../metrics/InternalGeoCentroid.java | 5 ++ .../metrics/InternalHDRPercentileRanks.java | 5 ++ .../metrics/InternalHDRPercentiles.java | 5 ++ .../InternalNumericMetricsAggregation.java | 10 +++ .../aggregations/metrics/InternalStats.java | 10 +++ .../InternalTDigestPercentileRanks.java | 5 ++ .../metrics/InternalTDigestPercentiles.java | 5 ++ .../metrics/NumericMetricsAggregation.java | 10 +++ .../metrics/NumericMetricsAggregator.java | 10 +++ .../metrics/PercentilesConfig.java | 10 +++ .../metrics/TopHitsAggregator.java | 5 ++ .../aggregations/pipeline/BucketHelpers.java | 2 + .../aggregations/pipeline/EwmaModel.java | 5 ++ .../pipeline/HoltLinearModel.java | 5 ++ .../pipeline/HoltWintersModel.java | 10 +++ .../pipeline/InternalPercentilesBucket.java | 5 ++ .../aggregations/pipeline/LinearModel.java | 5 ++ .../aggregations/pipeline/MovAvgModel.java | 2 + .../pipeline/MovingFunctionScript.java | 5 ++ .../pipeline/PipelineAggregator.java | 4 ++ .../aggregations/pipeline/SimpleModel.java | 5 ++ .../aggregations/support/AggregationPath.java | 5 ++ .../support/AggregationUsageService.java | 5 ++ .../BaseMultiValuesSourceFieldConfig.java | 5 ++ .../support/MultiTermsValuesSourceConfig.java | 10 +++ .../support/MultiValuesSource.java | 5 ++ .../MultiValuesSourceAggregationBuilder.java | 5 ++ .../support/MultiValuesSourceFieldConfig.java | 5 ++ .../aggregations/support/ValuesSource.java | 68 +++++++++++++++++++ .../ValuesSourceAggregationBuilder.java | 5 ++ .../support/ValuesSourceRegistry.java | 10 +++ .../search/builder/SearchSourceBuilder.java | 10 +++ .../search/fetch/FetchSubPhase.java | 5 ++ .../fetch/subphase/ScriptFieldsContext.java | 5 ++ .../subphase/highlight/HighlightBuilder.java | 15 ++++ .../subphase/highlight/HighlightUtils.java | 5 ++ .../highlight/SearchHighlightContext.java | 10 +++ .../opensearch/search/query/QueryPhase.java | 4 ++ .../search/rescore/QueryRescorer.java | 5 ++ .../opensearch/search/sort/BucketedSort.java | 24 +++++++ .../search/sort/ScriptSortBuilder.java | 5 ++ .../suggest/SuggestionSearchContext.java | 5 ++ .../completion/CompletionSuggestion.java | 10 +++ .../suggest/completion/FuzzyOptions.java | 2 + .../suggest/completion/RegexOptions.java | 2 + .../context/CategoryContextMapping.java | 2 + .../context/CategoryQueryContext.java | 5 ++ .../completion/context/ContextMapping.java | 10 +++ .../completion/context/GeoContextMapping.java | 5 ++ .../completion/context/GeoQueryContext.java | 5 ++ .../phrase/DirectCandidateGenerator.java | 15 ++++ .../suggest/phrase/PhraseSuggestion.java | 10 +++ .../phrase/PhraseSuggestionBuilder.java | 2 + .../search/suggest/phrase/WordScorer.java | 5 ++ .../search/suggest/term/TermSuggestion.java | 20 ++++-- .../suggest/term/TermSuggestionBuilder.java | 12 +++- 200 files changed, 1521 insertions(+), 18 deletions(-) diff --git a/server/src/main/java/org/opensearch/Build.java b/server/src/main/java/org/opensearch/Build.java index 1d21de6863e..364b17ad4aa 100644 --- a/server/src/main/java/org/opensearch/Build.java +++ b/server/src/main/java/org/opensearch/Build.java @@ -56,6 +56,11 @@ public class Build { */ public static final Build CURRENT; + /** + * The type of build + * + * @opensearch.internal + */ public enum Type { DEB("deb"), diff --git a/server/src/main/java/org/opensearch/http/CorsHandler.java b/server/src/main/java/org/opensearch/http/CorsHandler.java index 3a16c8f82e4..fe6727b76ee 100644 --- a/server/src/main/java/org/opensearch/http/CorsHandler.java +++ b/server/src/main/java/org/opensearch/http/CorsHandler.java @@ -261,6 +261,11 @@ public class CorsHandler { response.addHeader(ACCESS_CONTROL_MAX_AGE, Long.toString(config.maxAge)); } + /** + * The cors handler configuration + * + * @opensearch.internal + */ public static class Config { private final boolean enabled; diff --git a/server/src/main/java/org/opensearch/http/HttpRequest.java b/server/src/main/java/org/opensearch/http/HttpRequest.java index 83980c3539d..c78db0f40c9 100644 --- a/server/src/main/java/org/opensearch/http/HttpRequest.java +++ b/server/src/main/java/org/opensearch/http/HttpRequest.java @@ -49,6 +49,11 @@ import java.util.Map; */ public interface HttpRequest { + /** + * Which HTTP version being used + * + * @opensearch.internal + */ enum HttpVersion { HTTP_1_0, HTTP_1_1 diff --git a/server/src/main/java/org/opensearch/indices/IndexingMemoryController.java b/server/src/main/java/org/opensearch/indices/IndexingMemoryController.java index ae51a525765..611d348fb67 100644 --- a/server/src/main/java/org/opensearch/indices/IndexingMemoryController.java +++ b/server/src/main/java/org/opensearch/indices/IndexingMemoryController.java @@ -260,6 +260,11 @@ public class IndexingMemoryController implements IndexingOperationListener, Clos } } + /** + * The bytes used by a shard and a reference to the shard + * + * @opensearch.internal + */ private static final class ShardAndBytesUsed implements Comparable { final long bytesUsed; final IndexShard shard; diff --git a/server/src/main/java/org/opensearch/indices/IndicesQueryCache.java b/server/src/main/java/org/opensearch/indices/IndicesQueryCache.java index ce94d769f9c..78970267f67 100644 --- a/server/src/main/java/org/opensearch/indices/IndicesQueryCache.java +++ b/server/src/main/java/org/opensearch/indices/IndicesQueryCache.java @@ -216,6 +216,11 @@ public class IndicesQueryCache implements QueryCache, Closeable { cache.clear(); } + /** + * Statistics for the indices query cache + * + * @opensearch.internal + */ private static class Stats implements Cloneable { final ShardId shardId; @@ -251,6 +256,11 @@ public class IndicesQueryCache implements QueryCache, Closeable { } } + /** + * Statistics and Counts + * + * @opensearch.internal + */ private static class StatsAndCount { volatile int count; final Stats stats; diff --git a/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java b/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java index 920d3492e0b..151131e719d 100644 --- a/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java +++ b/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java @@ -176,6 +176,11 @@ public final class IndicesRequestCache implements RemovalListener { private final CacheEntity entity; @@ -238,6 +243,11 @@ public final class IndicesRequestCache implements RemovalListener notification); } + /** + * Unique key for the cache + * + * @opensearch.internal + */ static class Key implements Accountable { private static final long BASE_RAM_BYTES_USED = RamUsageEstimator.shallowSizeOfInstance(Key.class); diff --git a/server/src/main/java/org/opensearch/indices/IndicesService.java b/server/src/main/java/org/opensearch/indices/IndicesService.java index 87cd63119f1..b5da0ae1f76 100644 --- a/server/src/main/java/org/opensearch/indices/IndicesService.java +++ b/server/src/main/java/org/opensearch/indices/IndicesService.java @@ -913,6 +913,11 @@ public class IndicesService extends AbstractLifecycleComponent return indicesQueryCache; } + /** + * Statistics for old shards + * + * @opensearch.internal + */ static class OldShardsStats implements IndexEventListener { final SearchStats searchStats = new SearchStats(); @@ -1236,6 +1241,11 @@ public class IndicesService extends AbstractLifecycleComponent } } + /** + * A pending delete + * + * @opensearch.internal + */ private static final class PendingDelete implements Comparable { final Index index; final int shardId; @@ -1386,6 +1396,8 @@ public class IndicesService extends AbstractLifecycleComponent * periodically. In this case it is the field data cache, because a cache that * has an entry invalidated may not clean up the entry if it is not read from * or written to after invalidation. + * + * @opensearch.internal */ private static final class CacheCleaner implements Runnable, Releasable { @@ -1574,6 +1586,11 @@ public class IndicesService extends AbstractLifecycleComponent return indicesRequestCache.getOrCompute(cacheEntity, supplier, reader, cacheKey); } + /** + * An item in the index shard cache + * + * @opensearch.internal + */ static final class IndexShardCacheEntity extends AbstractIndexShardCacheEntity { private static final long BASE_RAM_BYTES_USED = RamUsageEstimator.shallowSizeOfInstance(IndexShardCacheEntity.class); private final IndexShard indexShard; diff --git a/server/src/main/java/org/opensearch/indices/NodeIndicesStats.java b/server/src/main/java/org/opensearch/indices/NodeIndicesStats.java index b6eedb338b0..5771380023b 100644 --- a/server/src/main/java/org/opensearch/indices/NodeIndicesStats.java +++ b/server/src/main/java/org/opensearch/indices/NodeIndicesStats.java @@ -271,6 +271,11 @@ public class NodeIndicesStats implements Writeable, ToXContentFragment { } } + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; } diff --git a/server/src/main/java/org/opensearch/indices/analysis/PreBuiltCacheFactory.java b/server/src/main/java/org/opensearch/indices/analysis/PreBuiltCacheFactory.java index 192301c7bd9..601bd79a247 100644 --- a/server/src/main/java/org/opensearch/indices/analysis/PreBuiltCacheFactory.java +++ b/server/src/main/java/org/opensearch/indices/analysis/PreBuiltCacheFactory.java @@ -60,6 +60,11 @@ public class PreBuiltCacheFactory { OPENSEARCH } + /** + * The prebuilt cache + * + * @opensearch.internal + */ public interface PreBuiltCache { T get(Version version); @@ -86,6 +91,8 @@ public class PreBuiltCacheFactory { /** * This is a pretty simple cache, it only contains one version + * + * @opensearch.internal */ private static class PreBuiltCacheStrategyOne implements PreBuiltCache { @@ -109,6 +116,8 @@ public class PreBuiltCacheFactory { /** * This cache contains one version for each opensearch version object + * + * @opensearch.internal */ private static class PreBuiltCacheStrategyOpenSearch implements PreBuiltCache { @@ -132,6 +141,8 @@ public class PreBuiltCacheFactory { /** * This cache uses the lucene version for caching + * + * @opensearch.internal */ private static class PreBuiltCacheStrategyLucene implements PreBuiltCache { diff --git a/server/src/main/java/org/opensearch/indices/breaker/AllCircuitBreakerStats.java b/server/src/main/java/org/opensearch/indices/breaker/AllCircuitBreakerStats.java index 01284d42a3c..0ecb3833fd0 100644 --- a/server/src/main/java/org/opensearch/indices/breaker/AllCircuitBreakerStats.java +++ b/server/src/main/java/org/opensearch/indices/breaker/AllCircuitBreakerStats.java @@ -87,6 +87,11 @@ public class AllCircuitBreakerStats implements Writeable, ToXContentFragment { return builder; } + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String BREAKERS = "breakers"; } diff --git a/server/src/main/java/org/opensearch/indices/breaker/CircuitBreakerStats.java b/server/src/main/java/org/opensearch/indices/breaker/CircuitBreakerStats.java index 64bf4c16a60..ab06cfaacd1 100644 --- a/server/src/main/java/org/opensearch/indices/breaker/CircuitBreakerStats.java +++ b/server/src/main/java/org/opensearch/indices/breaker/CircuitBreakerStats.java @@ -132,6 +132,11 @@ public class CircuitBreakerStats implements Writeable, ToXContentObject { + "]"; } + /** + * Fields used for statistics + * + * @opensearch.internal + */ static final class Fields { static final String LIMIT = "limit_size_in_bytes"; static final String LIMIT_HUMAN = "limit_size"; diff --git a/server/src/main/java/org/opensearch/indices/breaker/HierarchyCircuitBreakerService.java b/server/src/main/java/org/opensearch/indices/breaker/HierarchyCircuitBreakerService.java index 02d1e1a76f3..c0056aab3fb 100644 --- a/server/src/main/java/org/opensearch/indices/breaker/HierarchyCircuitBreakerService.java +++ b/server/src/main/java/org/opensearch/indices/breaker/HierarchyCircuitBreakerService.java @@ -341,6 +341,11 @@ public class HierarchyCircuitBreakerService extends CircuitBreakerService { ); } + /** + * Tracks memory usage + * + * @opensearch.internal + */ static class MemoryUsage { final long baseUsage; final long totalUsage; @@ -505,6 +510,11 @@ public class HierarchyCircuitBreakerService extends CircuitBreakerService { MemoryUsage overLimit(MemoryUsage memoryUsed); } + /** + * Kicks in G1GC if heap gets too high + * + * @opensearch.internal + */ static class G1OverLimitStrategy implements OverLimitStrategy { private final long g1RegionSize; private final LongSupplier currentMemoryUsageSupplier; diff --git a/server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java b/server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java index b891784c81d..29f74f8a86d 100644 --- a/server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java +++ b/server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java @@ -846,6 +846,11 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent imple } } + /** + * A shard + * + * @opensearch.internal + */ public interface Shard { /** @@ -894,6 +899,11 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent imple ) throws IOException; } + /** + * An allocated index + * + * @opensearch.internal + */ public interface AllocatedIndex extends Iterable, IndexComponent { /** @@ -926,6 +936,11 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent imple void removeShard(int shardId, String message); } + /** + * Allocated indices + * + * @opensearch.internal + */ public interface AllocatedIndices> extends Iterable { /** @@ -1012,6 +1027,11 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent imple void processPendingDeletes(Index index, IndexSettings indexSettings, TimeValue timeValue) throws IOException, InterruptedException, ShardLockObtainFailedException; + /** + * Why the index was removed + * + * @opensearch.internal + */ enum IndexRemovalReason { /** * Shard of this index were previously assigned to this node but all shards have been relocated. diff --git a/server/src/main/java/org/opensearch/indices/fielddata/cache/IndicesFieldDataCache.java b/server/src/main/java/org/opensearch/indices/fielddata/cache/IndicesFieldDataCache.java index 01e00fdc198..1833ae8900a 100644 --- a/server/src/main/java/org/opensearch/indices/fielddata/cache/IndicesFieldDataCache.java +++ b/server/src/main/java/org/opensearch/indices/fielddata/cache/IndicesFieldDataCache.java @@ -125,6 +125,11 @@ public class IndicesFieldDataCache implements RemovalListener { @Override public long applyAsLong(Key key, Accountable ramUsage) { @@ -135,6 +140,8 @@ public class IndicesFieldDataCache implements RemovalListener { final long requestSeqId; final Source source; @@ -223,6 +228,11 @@ public abstract class MultiChunkTransfer { diff --git a/server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java b/server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java index fdbdbf4c688..0870fd4ca92 100644 --- a/server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java +++ b/server/src/main/java/org/opensearch/indices/recovery/RecoverySourceHandler.java @@ -498,6 +498,11 @@ public class RecoverySourceHandler { FutureUtils.get(future); } + /** + * A send file result + * + * @opensearch.internal + */ static final class SendFileResult { final List phase1FileNames; final List phase1FileSizes; @@ -853,6 +858,11 @@ public class RecoverySourceHandler { sender.start(); } + /** + * An operation chunk request + * + * @opensearch.internal + */ private static class OperationChunkRequest implements MultiChunkTransfer.ChunkRequest { final List operations; final boolean lastChunk; @@ -1009,6 +1019,11 @@ public class RecoverySourceHandler { }, listener::onFailure); } + /** + * A result for a send snapshot + * + * @opensearch.internal + */ static final class SendSnapshotResult { final long targetLocalCheckpoint; final int sentOperations; @@ -1041,6 +1056,11 @@ public class RecoverySourceHandler { + '}'; } + /** + * A file chunk from the recovery source + * + * @opensearch.internal + */ private static class FileChunk implements MultiChunkTransfer.ChunkRequest, Releasable { final StoreFileMetadata md; final BytesReference content; diff --git a/server/src/main/java/org/opensearch/indices/recovery/RecoveryState.java b/server/src/main/java/org/opensearch/indices/recovery/RecoveryState.java index edca0aaa212..35ac5cbc12b 100644 --- a/server/src/main/java/org/opensearch/indices/recovery/RecoveryState.java +++ b/server/src/main/java/org/opensearch/indices/recovery/RecoveryState.java @@ -58,6 +58,11 @@ import java.util.Locale; */ public class RecoveryState implements ToXContentFragment, Writeable { + /** + * The stage of the recovery state + * + * @opensearch.internal + */ public enum Stage { INIT((byte) 0), @@ -328,6 +333,11 @@ public class RecoveryState implements ToXContentFragment, Writeable { return builder; } + /** + * Fields used in the recovery state + * + * @opensearch.internal + */ static final class Fields { static final String ID = "id"; static final String TYPE = "type"; @@ -356,6 +366,11 @@ public class RecoveryState implements ToXContentFragment, Writeable { static final String PERCENT = "percent"; } + /** + * Verifys the lucene index + * + * @opensearch.internal + */ public static class VerifyIndex extends ReplicationTimer implements ToXContentFragment, Writeable { private volatile long checkIndexTime; @@ -393,6 +408,11 @@ public class RecoveryState implements ToXContentFragment, Writeable { } } + /** + * The translog + * + * @opensearch.internal + */ public static class Translog extends ReplicationTimer implements ToXContentFragment, Writeable { public static final int UNKNOWN = -1; diff --git a/server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java b/server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java index ee8919d0dc9..d1066b867f9 100644 --- a/server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java +++ b/server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java @@ -307,6 +307,11 @@ public final class ReplicationLuceneIndex extends ReplicationTimer implements To return filesDetails.get(dest); } + /** + * Details about the files + * + * @opensearch.internal + */ private static final class FilesDetails implements ToXContentFragment, Writeable { protected final Map fileMetadataMap = new HashMap<>(); protected boolean complete; @@ -397,6 +402,11 @@ public final class ReplicationLuceneIndex extends ReplicationTimer implements To } } + /** + * Metadata about a file + * + * @opensearch.internal + */ public static final class FileMetadata implements ToXContentObject, Writeable { private String name; private long length; @@ -500,6 +510,8 @@ public final class ReplicationLuceneIndex extends ReplicationTimer implements To /** * Duplicates many of Field names in {@link RecoveryState} + * + * @opensearch.internal */ static final class Fields { static final String TOTAL_TIME = "total_time"; diff --git a/server/src/main/java/org/opensearch/indices/store/IndicesStore.java b/server/src/main/java/org/opensearch/indices/store/IndicesStore.java index 11442632246..96e84fb69b5 100644 --- a/server/src/main/java/org/opensearch/indices/store/IndicesStore.java +++ b/server/src/main/java/org/opensearch/indices/store/IndicesStore.java @@ -452,6 +452,11 @@ public class IndicesStore implements ClusterStateListener, Closeable { } + /** + * A shard active request + * + * @opensearch.internal + */ private static class ShardActiveRequest extends TransportRequest { protected TimeValue timeout = null; private ClusterName clusterName; @@ -483,6 +488,11 @@ public class IndicesStore implements ClusterStateListener, Closeable { } } + /** + * The shard active response + * + * @opensearch.internal + */ private static class ShardActiveResponse extends TransportResponse { private final boolean shardActive; diff --git a/server/src/main/java/org/opensearch/indices/store/TransportNodesListShardStoreMetadata.java b/server/src/main/java/org/opensearch/indices/store/TransportNodesListShardStoreMetadata.java index 538a8c871cb..b49cdcd1279 100644 --- a/server/src/main/java/org/opensearch/indices/store/TransportNodesListShardStoreMetadata.java +++ b/server/src/main/java/org/opensearch/indices/store/TransportNodesListShardStoreMetadata.java @@ -77,6 +77,11 @@ import java.util.List; import java.util.Objects; import java.util.concurrent.TimeUnit; +/** + * Metadata for shard stores from a list of transport nodes + * + * @opensearch.internal + */ public class TransportNodesListShardStoreMetadata extends TransportNodesAction< TransportNodesListShardStoreMetadata.Request, TransportNodesListShardStoreMetadata.NodesStoreFilesMetadata, @@ -225,6 +230,11 @@ public class TransportNodesListShardStoreMetadata extends TransportNodesAction< } } + /** + * Metadata for store files + * + * @opensearch.internal + */ public static class StoreFilesMetadata implements Iterable, Writeable { private final ShardId shardId; private final Store.MetadataSnapshot metadataSnapshot; @@ -318,6 +328,11 @@ public class TransportNodesListShardStoreMetadata extends TransportNodesAction< } } + /** + * The request + * + * @opensearch.internal + */ public static class Request extends BaseNodesRequest { private final ShardId shardId; @@ -364,6 +379,11 @@ public class TransportNodesListShardStoreMetadata extends TransportNodesAction< } } + /** + * Metadata for the nodes store files + * + * @opensearch.internal + */ public static class NodesStoreFilesMetadata extends BaseNodesResponse { public NodesStoreFilesMetadata(StreamInput in) throws IOException { @@ -385,6 +405,11 @@ public class TransportNodesListShardStoreMetadata extends TransportNodesAction< } } + /** + * The node request + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { private final ShardId shardId; @@ -431,6 +456,11 @@ public class TransportNodesListShardStoreMetadata extends TransportNodesAction< } } + /** + * The metadata for the node store files + * + * @opensearch.internal + */ public static class NodeStoreFilesMetadata extends BaseNodeResponse { private StoreFilesMetadata storeFilesMetadata; diff --git a/server/src/main/java/org/opensearch/search/DocValueFormat.java b/server/src/main/java/org/opensearch/search/DocValueFormat.java index 5c8bcfb4dcf..7e7e4f83334 100644 --- a/server/src/main/java/org/opensearch/search/DocValueFormat.java +++ b/server/src/main/java/org/opensearch/search/DocValueFormat.java @@ -201,6 +201,11 @@ public interface DocValueFormat extends NamedWriteable { } } + /** + * Date time doc value format + * + * @opensearch.internal + */ final class DateTime implements DocValueFormat { public static final String NAME = "date_time"; @@ -406,6 +411,11 @@ public interface DocValueFormat extends NamedWriteable { } }; + /** + * Decimal doc value format + * + * @opensearch.internal + */ final class Decimal implements DocValueFormat { public static final String NAME = "decimal"; diff --git a/server/src/main/java/org/opensearch/search/SearchHit.java b/server/src/main/java/org/opensearch/search/SearchHit.java index 8297ae0798e..89eeddb07ce 100644 --- a/server/src/main/java/org/opensearch/search/SearchHit.java +++ b/server/src/main/java/org/opensearch/search/SearchHit.java @@ -590,6 +590,11 @@ public final class SearchHit implements Writeable, ToXContentObject, Iterable estimatedMinAndMax; diff --git a/server/src/main/java/org/opensearch/search/aggregations/AggregationBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/AggregationBuilder.java index 5c76f0cc091..f5f11834b44 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/AggregationBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/AggregationBuilder.java @@ -166,6 +166,8 @@ public abstract class AggregationBuilder *

* Unlike {@link CardinalityUpperBound} which is total * instead of per parent bucket. + * + * @opensearch.internal */ public enum BucketCardinality { NONE, @@ -179,7 +181,11 @@ public abstract class AggregationBuilder */ public abstract BucketCardinality bucketCardinality(); - /** Common xcontent fields shared among aggregator builders */ + /** + * Common xcontent fields shared among aggregator builders + * + * @opensearch.internal + */ public static final class CommonFields extends ParseField.CommonFields { public static final ParseField VALUE_TYPE = new ParseField("value_type"); } diff --git a/server/src/main/java/org/opensearch/search/aggregations/Aggregator.java b/server/src/main/java/org/opensearch/search/aggregations/Aggregator.java index 99a54bbdc27..c1aa0965b03 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/Aggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/Aggregator.java @@ -63,6 +63,8 @@ public abstract class Aggregator extends BucketCollector implements Releasable { * Parses the aggregation request and creates the appropriate aggregator factory for it. * * @see AggregationBuilder + * + * @opensearch.internal */ @FunctionalInterface public interface Parser { @@ -157,6 +159,8 @@ public abstract class Aggregator extends BucketCollector implements Releasable { /** * Compare two buckets by their ordinal. + * + * @opensearch.internal */ @FunctionalInterface public interface BucketComparator { @@ -204,7 +208,11 @@ public abstract class Aggregator extends BucketCollector implements Releasable { */ public void collectDebugInfo(BiConsumer add) {} - /** Aggregation mode for sub aggregations. */ + /** + * Aggregation mode for sub aggregations. + * + * @opensearch.internal + */ public enum SubAggCollectionMode implements Writeable { /** diff --git a/server/src/main/java/org/opensearch/search/aggregations/AggregatorFactories.java b/server/src/main/java/org/opensearch/search/aggregations/AggregatorFactories.java index ec536578f72..75e887fbe0d 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/AggregatorFactories.java +++ b/server/src/main/java/org/opensearch/search/aggregations/AggregatorFactories.java @@ -295,6 +295,8 @@ public class AggregatorFactories { /** * A mutable collection of {@link AggregationBuilder}s and * {@link PipelineAggregationBuilder}s. + * + * @opensearch.internal */ public static class Builder implements Writeable, ToXContentObject { private final Set names = new HashSet<>(); diff --git a/server/src/main/java/org/opensearch/search/aggregations/CardinalityUpperBound.java b/server/src/main/java/org/opensearch/search/aggregations/CardinalityUpperBound.java index 7596cf471c4..15beeac8293 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/CardinalityUpperBound.java +++ b/server/src/main/java/org/opensearch/search/aggregations/CardinalityUpperBound.java @@ -113,6 +113,8 @@ public abstract class CardinalityUpperBound { /** * Cardinality estimate with a known upper bound. + * + * @opensearch.internal */ private static class KnownCardinalityUpperBound extends CardinalityUpperBound { private final int estimate; diff --git a/server/src/main/java/org/opensearch/search/aggregations/InternalAggregation.java b/server/src/main/java/org/opensearch/search/aggregations/InternalAggregation.java index 55c400218b0..6ccd4293888 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/InternalAggregation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/InternalAggregation.java @@ -64,6 +64,8 @@ import static java.util.Objects.requireNonNull; public abstract class InternalAggregation implements Aggregation, NamedWriteable { /** * Builds {@link ReduceContext}. + * + * @opensearch.internal */ public interface ReduceContextBuilder { /** @@ -77,6 +79,11 @@ public abstract class InternalAggregation implements Aggregation, NamedWriteable ReduceContext forFinalReduction(); } + /** + * The reduce context + * + * @opensearch.internal + */ public static class ReduceContext { private final BigArrays bigArrays; private final ScriptService scriptService; diff --git a/server/src/main/java/org/opensearch/search/aggregations/InternalAggregations.java b/server/src/main/java/org/opensearch/search/aggregations/InternalAggregations.java index fb8fb18598d..79dd8d756de 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/InternalAggregations.java +++ b/server/src/main/java/org/opensearch/search/aggregations/InternalAggregations.java @@ -304,6 +304,11 @@ public final class InternalAggregations extends Aggregations implements Writeabl } } + /** + * A counting stream output + * + * @opensearch.internal + */ private static class CountingStreamOutput extends StreamOutput { long size = 0; diff --git a/server/src/main/java/org/opensearch/search/aggregations/InternalMultiBucketAggregation.java b/server/src/main/java/org/opensearch/search/aggregations/InternalMultiBucketAggregation.java index b519334e6f9..c191507cf99 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/InternalMultiBucketAggregation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/InternalMultiBucketAggregation.java @@ -223,6 +223,11 @@ public abstract class InternalMultiBucketAggregation< return reducedBuckets; } + /** + * An internal buck for the internal multibucket agg + * + * @opensearch.internal + */ public abstract static class InternalBucket implements Bucket, Writeable { public Object getProperty(String containingAggName, List path) { diff --git a/server/src/main/java/org/opensearch/search/aggregations/InternalOrder.java b/server/src/main/java/org/opensearch/search/aggregations/InternalOrder.java index 491e08bc847..ba1c6eea049 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/InternalOrder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/InternalOrder.java @@ -65,6 +65,8 @@ public abstract class InternalOrder extends BucketOrder { // TODO merge the contents of this file into BucketOrder. The way it is now is relic. /** * {@link Bucket} ordering strategy to sort by a sub-aggregation. + * + * @opensearch.internal */ public static class Aggregation extends InternalOrder { static final byte ID = 0; @@ -133,6 +135,8 @@ public abstract class InternalOrder extends BucketOrder { /** * {@link Bucket} ordering strategy to sort by multiple criteria. + * + * @opensearch.internal */ public static class CompoundOrder extends BucketOrder { @@ -244,6 +248,8 @@ public abstract class InternalOrder extends BucketOrder { * {@link BucketOrder} implementation for simple, fixed orders like * {@link InternalOrder#COUNT_ASC}. Complex implementations should not * use this. + * + * @opensearch.internal */ private static class SimpleOrder extends InternalOrder { private final byte id; @@ -405,6 +411,8 @@ public abstract class InternalOrder extends BucketOrder { /** * Contains logic for reading/writing {@link BucketOrder} from/to streams. + * + * @opensearch.internal */ public static class Streams { @@ -493,6 +501,8 @@ public abstract class InternalOrder extends BucketOrder { /** * Contains logic for parsing a {@link BucketOrder} from a {@link XContentParser}. + * + * @opensearch.internal */ public static class Parser { diff --git a/server/src/main/java/org/opensearch/search/aggregations/MultiBucketCollector.java b/server/src/main/java/org/opensearch/search/aggregations/MultiBucketCollector.java index 80c7b37624f..8f7222729ef 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/MultiBucketCollector.java +++ b/server/src/main/java/org/opensearch/search/aggregations/MultiBucketCollector.java @@ -176,6 +176,11 @@ public class MultiBucketCollector extends BucketCollector { } } + /** + * A multi leaf bucket collector + * + * @opensearch.internal + */ private static class MultiLeafBucketCollector extends LeafBucketCollector { private final boolean cacheScores; diff --git a/server/src/main/java/org/opensearch/search/aggregations/MultiBucketConsumerService.java b/server/src/main/java/org/opensearch/search/aggregations/MultiBucketConsumerService.java index d7c1796b171..ec1729a0f51 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/MultiBucketConsumerService.java +++ b/server/src/main/java/org/opensearch/search/aggregations/MultiBucketConsumerService.java @@ -76,6 +76,11 @@ public class MultiBucketConsumerService { this.maxBucket = maxBucket; } + /** + * Thrown when there are too many buckets + * + * @opensearch.internal + */ public static class TooManyBucketsException extends AggregationExecutionException { private final int maxBuckets; @@ -115,6 +120,8 @@ public class MultiBucketConsumerService { * when the sum of the provided values is above the limit (`search.max_buckets`). * It is used by aggregators to limit the number of bucket creation during * {@link Aggregator#buildAggregations} and {@link InternalAggregation#reduce}. + * + * @opensearch.internal */ public static class MultiBucketConsumer implements IntConsumer { private final int limit; diff --git a/server/src/main/java/org/opensearch/search/aggregations/ParsedMultiBucketAggregation.java b/server/src/main/java/org/opensearch/search/aggregations/ParsedMultiBucketAggregation.java index 6258295a2b7..d3997598baf 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/ParsedMultiBucketAggregation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/ParsedMultiBucketAggregation.java @@ -99,6 +99,11 @@ public abstract class ParsedMultiBucketAggregation siblingAggregations; private final Collection siblingPipelineAggregations; @@ -162,6 +172,11 @@ public abstract class PipelineAggregationBuilder } } + /** + * The internal tree node + * + * @opensearch.internal + */ private static class ForInsideTree extends ValidationContext { private final AggregationBuilder parent; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/BestBucketsDeferringCollector.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/BestBucketsDeferringCollector.java index f3addc9522a..2e7c4659bcb 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/BestBucketsDeferringCollector.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/BestBucketsDeferringCollector.java @@ -65,6 +65,11 @@ import java.util.Objects; * @opensearch.internal */ public class BestBucketsDeferringCollector extends DeferringBucketCollector { + /** + * Entry in the bucket collector + * + * @opensearch.internal + */ static class Entry { final LeafReaderContext context; final PackedLongValues docDeltas; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/BucketsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/BucketsAggregator.java index 9e35a2745fc..79512586d06 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/BucketsAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/BucketsAggregator.java @@ -330,6 +330,11 @@ public abstract class BucketsAggregator extends AggregatorBase { return results; } + /** + * A bucket builder for a fixed count + * + * @opensearch.internal + */ @FunctionalInterface protected interface BucketBuilderForFixedCount { B build(int offsetInOwningOrd, int docCount, InternalAggregations subAggregationResults); @@ -355,6 +360,11 @@ public abstract class BucketsAggregator extends AggregatorBase { return results; } + /** + * A single bucket result builder + * + * @opensearch.internal + */ @FunctionalInterface protected interface SingleBucketResultBuilder { InternalAggregation build(long owningBucketOrd, InternalAggregations subAggregationResults); @@ -415,11 +425,21 @@ public abstract class BucketsAggregator extends AggregatorBase { return results; } + /** + * A bucket builder for a variable + * + * @opensearch.internal + */ @FunctionalInterface protected interface BucketBuilderForVariable { B build(long bucketValue, int docCount, InternalAggregations subAggregationResults); } + /** + * A result builder for a bucket variable + * + * @opensearch.internal + */ @FunctionalInterface protected interface ResultBuilderForVariable { InternalAggregation build(long owninigBucketOrd, List buckets); diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/DeferringBucketCollector.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/DeferringBucketCollector.java index d11fcfd104a..cfac1046c77 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/DeferringBucketCollector.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/DeferringBucketCollector.java @@ -72,6 +72,11 @@ public abstract class DeferringBucketCollector extends BucketCollector { return new WrappedAggregator(in); } + /** + * A wrapped aggregator + * + * @opensearch.internal + */ protected class WrappedAggregator extends Aggregator { private Aggregator in; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/AdjacencyMatrixAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/AdjacencyMatrixAggregator.java index 1cae870a378..c33887878db 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/AdjacencyMatrixAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/AdjacencyMatrixAggregator.java @@ -72,6 +72,11 @@ public class AdjacencyMatrixAggregator extends BucketsAggregator { public static final ParseField FILTERS_FIELD = new ParseField("filters"); + /** + * A keyed filter + * + * @opensearch.internal + */ protected static class KeyedFilter implements Writeable, ToXContentFragment { private final String key; private final QueryBuilder filter; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/InternalAdjacencyMatrix.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/InternalAdjacencyMatrix.java index 52a8d638d8e..d3920b3e515 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/InternalAdjacencyMatrix.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/InternalAdjacencyMatrix.java @@ -56,6 +56,12 @@ import java.util.Objects; public class InternalAdjacencyMatrix extends InternalMultiBucketAggregation implements AdjacencyMatrix { + + /** + * An internal bucket of the adjacency matrix + * + * @opensearch.internal + */ public static class InternalBucket extends InternalMultiBucketAggregation.InternalBucket implements AdjacencyMatrix.Bucket { private final String key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/ParsedAdjacencyMatrix.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/ParsedAdjacencyMatrix.java index f211c072cbd..0a9ae67e29f 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/ParsedAdjacencyMatrix.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/adjacency/ParsedAdjacencyMatrix.java @@ -90,6 +90,11 @@ public class ParsedAdjacencyMatrix extends ParsedMultiBucketAggregation getKey(); } diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeAggregator.java index 94fc48708c4..a907d17a731 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeAggregator.java @@ -577,6 +577,11 @@ final class CompositeAggregator extends BucketsAggregator { }; } + /** + * An entry in the composite aggregator + * + * @opensearch.internal + */ private static class Entry { final LeafReaderContext context; final DocIdSet docIdSet; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeValuesSourceConfig.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeValuesSourceConfig.java index c85099976b2..f26fc2144c9 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeValuesSourceConfig.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeValuesSourceConfig.java @@ -50,6 +50,11 @@ import java.util.function.LongConsumer; */ public class CompositeValuesSourceConfig { + /** + * A single dimension provider + * + * @opensearch.internal + */ @FunctionalInterface public interface SingleDimensionValuesSourceProvider { SingleDimensionValuesSource createValuesSource( diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java index ece8f506cbc..1d3a96e6688 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java @@ -75,6 +75,11 @@ import java.util.function.LongConsumer; public class DateHistogramValuesSourceBuilder extends CompositeValuesSourceBuilder implements DateIntervalConsumer { + /** + * Supplier for a composite date histogram + * + * @opensearch.internal + */ @FunctionalInterface public interface DateHistogramCompositeSupplier { CompositeValuesSourceConfig apply( diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/GeoTileGridValuesSourceBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/GeoTileGridValuesSourceBuilder.java index d4252d132ee..4b01a08d29a 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/GeoTileGridValuesSourceBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/GeoTileGridValuesSourceBuilder.java @@ -68,6 +68,11 @@ import java.util.function.LongUnaryOperator; * @opensearch.internal */ public class GeoTileGridValuesSourceBuilder extends CompositeValuesSourceBuilder { + /** + * Supplier for a composite geotile + * + * @opensearch.internal + */ @FunctionalInterface public interface GeoTileCompositeSuppier { CompositeValuesSourceConfig apply( diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/HistogramValuesSourceBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/HistogramValuesSourceBuilder.java index f087d2d0495..7f1393f7c8f 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/HistogramValuesSourceBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/HistogramValuesSourceBuilder.java @@ -61,6 +61,11 @@ import java.util.function.LongConsumer; * @opensearch.internal */ public class HistogramValuesSourceBuilder extends CompositeValuesSourceBuilder { + /** + * Composite histogram supplier + * + * @opensearch.internal + */ @FunctionalInterface public interface HistogramCompositeSupplier { CompositeValuesSourceConfig apply( diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/InternalComposite.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/InternalComposite.java index 8b28c1a7c5a..49e3d329352 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/InternalComposite.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/InternalComposite.java @@ -317,6 +317,11 @@ public class InternalComposite extends InternalMultiBucketAggregation { final Iterator it; InternalBucket current; @@ -335,6 +340,11 @@ public class InternalComposite extends InternalMultiBucketAggregation implements Comparable { final List keys; final Comparable[] values; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/ParsedComposite.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/ParsedComposite.java index 965dc42a1e0..69ac30bd6df 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/ParsedComposite.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/ParsedComposite.java @@ -106,6 +106,11 @@ public class ParsedComposite extends ParsedMultiBucketAggregation key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/TermsValuesSourceBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/TermsValuesSourceBuilder.java index ea1fc88e5cc..64b2635ea7f 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/TermsValuesSourceBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/composite/TermsValuesSourceBuilder.java @@ -62,7 +62,11 @@ import java.util.function.LongUnaryOperator; * @opensearch.internal */ public class TermsValuesSourceBuilder extends CompositeValuesSourceBuilder { - + /** + * Composite supplier for terms + * + * @opensearch.internal + */ @FunctionalInterface public interface TermsCompositeSupplier { CompositeValuesSourceConfig apply( diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/FiltersAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/FiltersAggregator.java index 1b58d5372c5..efdecbdd84d 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/FiltersAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/FiltersAggregator.java @@ -71,6 +71,11 @@ public class FiltersAggregator extends BucketsAggregator { public static final ParseField OTHER_BUCKET_FIELD = new ParseField("other_bucket"); public static final ParseField OTHER_BUCKET_KEY_FIELD = new ParseField("other_bucket_key"); + /** + * Keyed filter for the filters agg + * + * @opensearch.internal + */ public static class KeyedFilter implements Writeable, ToXContentFragment { private final String key; private final QueryBuilder filter; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/InternalFilters.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/InternalFilters.java index ba7cb41f63a..c15caa46d52 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/InternalFilters.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/InternalFilters.java @@ -53,6 +53,11 @@ import java.util.Objects; * @opensearch.internal */ public class InternalFilters extends InternalMultiBucketAggregation implements Filters { + /** + * Internal bucket for an internal filters agg + * + * @opensearch.internal + */ public static class InternalBucket extends InternalMultiBucketAggregation.InternalBucket implements Filters.Bucket { private final boolean keyed; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/ParsedFilters.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/ParsedFilters.java index 0ac821b6c8a..22a9165b418 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/ParsedFilters.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/filter/ParsedFilters.java @@ -106,6 +106,11 @@ public class ParsedFilters extends ParsedMultiBucketAggregationroughly * logarithmically increasing. + * + * @opensearch.internal */ private static class FromSingle extends AutoDateHistogramAggregator { private int roundingIdx; @@ -406,6 +408,8 @@ abstract class AutoDateHistogramAggregator extends DeferableBucketAggregator { * rounding all of the keys for {@code owningBucketOrd} that we're going to * collect and picking the rounding based on a real, accurate count and the * min and max. + * + * @opensearch.internal */ private static class FromMany extends AutoDateHistogramAggregator { /** diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/DateIntervalWrapper.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/DateIntervalWrapper.java index 6c187f7924a..d378bb2ec1b 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/DateIntervalWrapper.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/DateIntervalWrapper.java @@ -75,6 +75,11 @@ public class DateIntervalWrapper implements ToXContentFragment, Writeable { private static final ParseField FIXED_INTERVAL_FIELD = new ParseField("fixed_interval"); private static final ParseField CALENDAR_INTERVAL_FIELD = new ParseField("calendar_interval"); + /** + * The type of interval + * + * @opensearch.internal + */ public enum IntervalTypeEnum implements Writeable { NONE, FIXED, diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalAutoDateHistogram.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalAutoDateHistogram.java index 55ef48211bc..a91ddf2e648 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalAutoDateHistogram.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalAutoDateHistogram.java @@ -66,6 +66,11 @@ public final class InternalAutoDateHistogram extends InternalMultiBucketAggregat InternalAutoDateHistogram, InternalAutoDateHistogram.Bucket> implements Histogram, HistogramFactory { + /** + * Bucket for the internal auto date histogram agg + * + * @opensearch.internal + */ public static class Bucket extends InternalMultiBucketAggregation.InternalBucket implements Histogram.Bucket, KeyComparable { final long key; @@ -157,6 +162,11 @@ public final class InternalAutoDateHistogram extends InternalMultiBucketAggregat } } + /** + * Information about the bucket + * + * @opensearch.internal + */ static class BucketInfo { final RoundingInfo[] roundingInfos; @@ -422,6 +432,11 @@ public final class InternalAutoDateHistogram extends InternalMultiBucketAggregat return new InternalAutoDateHistogram.Bucket(buckets.get(0).key, docCount, format, aggs); } + /** + * The result from a bucket reduce + * + * @opensearch.internal + */ private static class BucketReduceResult { final List buckets; final int roundingIdx; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalDateHistogram.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalDateHistogram.java index 068d6533c59..9aa6fd180c7 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalDateHistogram.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalDateHistogram.java @@ -68,6 +68,11 @@ public final class InternalDateHistogram extends InternalMultiBucketAggregation< Histogram, HistogramFactory { + /** + * Bucket for an internal date histogram agg + * + * @opensearch.internal + */ public static class Bucket extends InternalMultiBucketAggregation.InternalBucket implements Histogram.Bucket, KeyComparable { final long key; @@ -170,6 +175,11 @@ public final class InternalDateHistogram extends InternalMultiBucketAggregation< } } + /** + * Information about an empty bucket + * + * @opensearch.internal + */ static class EmptyBucketInfo { final Rounding rounding; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalHistogram.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalHistogram.java index c11f483392c..23e9fb7a8b4 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalHistogram.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/InternalHistogram.java @@ -64,6 +64,11 @@ public final class InternalHistogram extends InternalMultiBucketAggregation { final double key; @@ -166,6 +171,11 @@ public final class InternalHistogram extends InternalMultiBucketAggregation implements Histogram, HistogramFactory { + /** + * Bucket for an internal variable width histogram + * + * @opensearch.internal + */ public static class Bucket extends InternalMultiBucketAggregation.InternalBucket implements Histogram.Bucket, KeyComparable { + /** + * Bounds of the bucket + * + * @opensearch.internal + */ public static class BucketBounds { public double min; public double max; @@ -219,6 +229,11 @@ public class InternalVariableWidthHistogram extends InternalMultiBucketAggregati } } + /** + * Information about an empty bucket + * + * @opensearch.internal + */ static class EmptyBucketInfo { final InternalAggregations subAggregations; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/ParsedAutoDateHistogram.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/ParsedAutoDateHistogram.java index 83f776d34a1..95cf93b7229 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/ParsedAutoDateHistogram.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/ParsedAutoDateHistogram.java @@ -97,6 +97,11 @@ public class ParsedAutoDateHistogram extends ParsedMultiBucketAggregation metadata) { super(name, docCount, aggregations, metadata); diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregator.java index dc536aebc0c..5dc4d1c7803 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregator.java @@ -230,6 +230,11 @@ public class NestedAggregator extends BucketsAggregator implements SingleBucketA } } + /** + * A cached scorable doc + * + * @opensearch.internal + */ private static class CachedScorable extends Scorable { int doc; float score; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregatorFactory.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregatorFactory.java index 22b87280c85..ca1018795b5 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregatorFactory.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/NestedAggregatorFactory.java @@ -82,6 +82,11 @@ public class NestedAggregatorFactory extends AggregatorFactory { return new NestedAggregator(name, factories, parentObjectMapper, childObjectMapper, searchContext, parent, cardinality, metadata); } + /** + * Unmapped class for nested agg + * + * @opensearch.internal + */ private static final class Unmapped extends NonCollectingAggregator { Unmapped(String name, SearchContext context, Aggregator parent, AggregatorFactories factories, Map metadata) diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/ReverseNestedAggregatorFactory.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/ReverseNestedAggregatorFactory.java index 2929df697ea..27cd8a26888 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/ReverseNestedAggregatorFactory.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/nested/ReverseNestedAggregatorFactory.java @@ -83,6 +83,11 @@ public class ReverseNestedAggregatorFactory extends AggregatorFactory { } } + /** + * Unmapped class for reverse nested agg + * + * @opensearch.internal + */ private static final class Unmapped extends NonCollectingAggregator { Unmapped(String name, SearchContext context, Aggregator parent, AggregatorFactories factories, Map metadata) diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/BinaryRangeAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/BinaryRangeAggregator.java index c846ba6c48b..a48649af99b 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/BinaryRangeAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/BinaryRangeAggregator.java @@ -62,6 +62,11 @@ import static java.util.Collections.emptyList; */ public final class BinaryRangeAggregator extends BucketsAggregator { + /** + * Range for the binary range agg + * + * @opensearch.internal + */ public static class Range { final String key; @@ -144,6 +149,11 @@ public final class BinaryRangeAggregator extends BucketsAggregator { } } + /** + * Leaf collector for the sorted set range + * + * @opensearch.internal + */ abstract static class SortedSetRangeLeafCollector extends LeafBucketCollectorBase { final long[] froms, tos, maxTos; @@ -250,6 +260,11 @@ public final class BinaryRangeAggregator extends BucketsAggregator { protected abstract void doCollect(LeafBucketCollector sub, int doc, long bucket) throws IOException; } + /** + * Base class for a sorted binary range leaf collector + * + * @opensearch.internal + */ abstract static class SortedBinaryRangeLeafCollector extends LeafBucketCollectorBase { final Range[] ranges; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/GeoDistanceAggregationBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/GeoDistanceAggregationBuilder.java index 701f46719b8..944a580efde 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/GeoDistanceAggregationBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/GeoDistanceAggregationBuilder.java @@ -121,6 +121,11 @@ public class GeoDistanceAggregationBuilder extends ValuesSourceAggregationBuilde return builder; } + /** + * Range for a geo distance agg + * + * @opensearch.internal + */ public static class Range extends RangeAggregator.Range { public Range(String key, Double from, Double to) { super(key(key, from, to), from == null ? 0 : from, to); diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/GeoDistanceRangeAggregatorFactory.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/GeoDistanceRangeAggregatorFactory.java index cd8179f00a8..64c618e9351 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/GeoDistanceRangeAggregatorFactory.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/GeoDistanceRangeAggregatorFactory.java @@ -172,6 +172,11 @@ public class GeoDistanceRangeAggregatorFactory extends ValuesSourceAggregatorFac ); } + /** + * The source location for the distance calculation + * + * @opensearch.internal + */ private static class DistanceSource extends ValuesSource.Numeric { private final ValuesSource.GeoPoint source; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalBinaryRange.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalBinaryRange.java index 95e04d3f47e..fad1705278f 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalBinaryRange.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalBinaryRange.java @@ -61,6 +61,11 @@ public final class InternalBinaryRange extends InternalMultiBucketAggregation { public static final Factory FACTORY = new Factory(); + /** + * Bucket for a date range + * + * @opensearch.internal + */ public static class Bucket extends InternalRange.Bucket { public Bucket( @@ -113,6 +118,11 @@ public class InternalDateRange extends InternalRange { @Override public ValueType getValueType() { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalGeoDistance.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalGeoDistance.java index 0cbe572e319..4d5e9cbfb7e 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalGeoDistance.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalGeoDistance.java @@ -50,6 +50,11 @@ import java.util.Map; public class InternalGeoDistance extends InternalRange { public static final Factory FACTORY = new Factory(); + /** + * Bucket for a geo distance range + * + * @opensearch.internal + */ static class Bucket extends InternalRange.Bucket { Bucket(String key, double from, double to, long docCount, InternalAggregations aggregations, boolean keyed) { @@ -66,6 +71,11 @@ public class InternalGeoDistance extends InternalRange { @Override public ValuesSourceType getValueSourceType() { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalRange.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalRange.java index 8da0d132fd5..274b3741e6a 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalRange.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/InternalRange.java @@ -59,6 +59,11 @@ public class InternalRange> { public ValuesSourceType getValueSourceType() { return CoreValuesSourceType.NUMERIC; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/IpRangeAggregationBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/IpRangeAggregationBuilder.java index 843733d736b..cc304f987bc 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/IpRangeAggregationBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/IpRangeAggregationBuilder.java @@ -128,6 +128,11 @@ public final class IpRangeAggregationBuilder extends ValuesSourceAggregationBuil } } + /** + * Range for an IP range + * + * @opensearch.internal + */ public static class Range implements ToXContentObject { private final String key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/ParsedBinaryRange.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/ParsedBinaryRange.java index 68f8aae9aef..58c235f6df9 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/range/ParsedBinaryRange.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/range/ParsedBinaryRange.java @@ -82,6 +82,11 @@ public class ParsedBinaryRange extends ParsedMultiBucketAggregation extends NonCollectingAggregator { private final R[] ranges; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/sampler/SamplerAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/sampler/SamplerAggregator.java index fd1d7bf2997..afbf52cbdd0 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/sampler/SamplerAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/sampler/SamplerAggregator.java @@ -73,6 +73,11 @@ public class SamplerAggregator extends DeferableBucketAggregator implements Sing static final long SCOREDOCKEY_SIZE = RamUsageEstimator.shallowSizeOfInstance(DiversifiedTopDocsCollector.ScoreDocKey.class); + /** + * The execution mode for the sampler + * + * @opensearch.internal + */ public enum ExecutionMode { MAP(new ParseField("map")) { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/BytesKeyedBucketOrds.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/BytesKeyedBucketOrds.java index 7bfeff7615b..0eb23013d1e 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/BytesKeyedBucketOrds.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/BytesKeyedBucketOrds.java @@ -82,6 +82,8 @@ public abstract class BytesKeyedBucketOrds implements Releasable { /** * An iterator for buckets inside a particular {@code owningBucketOrd}. + * + * @opensearch.internal */ public interface BucketOrdsEnum { /** @@ -122,6 +124,8 @@ public abstract class BytesKeyedBucketOrds implements Releasable { /** * Implementation that only works if it is collecting from a single bucket. + * + * @opensearch.internal */ private static class FromSingle extends BytesKeyedBucketOrds { private final BytesRefHash ords; @@ -177,6 +181,8 @@ public abstract class BytesKeyedBucketOrds implements Releasable { /** * Implementation that works properly when collecting from many buckets. + * + * @opensearch.internal */ private static class FromMany extends BytesKeyedBucketOrds { // TODO we can almost certainly do better here by building something fit for purpose rather than trying to lego together stuff diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/DoubleTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/DoubleTerms.java index 7f276565778..6b44b2cdb8c 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/DoubleTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/DoubleTerms.java @@ -53,6 +53,11 @@ import java.util.Objects; public class DoubleTerms extends InternalMappedTerms { public static final String NAME = "dterms"; + /** + * Bucket for a double terms agg + * + * @opensearch.internal + */ static class Bucket extends InternalTerms.Bucket { double term; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java index 4be90ac2f9b..4fcc42b6211 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java @@ -90,6 +90,11 @@ public class GlobalOrdinalsStringTermsAggregator extends AbstractStringTermsAggr protected int segmentsWithSingleValuedOrds = 0; protected int segmentsWithMultiValuedOrds = 0; + /** + * Lookup global ordinals + * + * @opensearch.internal + */ public interface GlobalOrdLookupFunction { BytesRef apply(long ord) throws IOException; } @@ -231,6 +236,8 @@ public class GlobalOrdinalsStringTermsAggregator extends AbstractStringTermsAggr /** * This is used internally only, just for compare using global ordinal instead of term bytes in the PQ + * + * @opensearch.internal */ static class OrdBucket extends InternalTerms.Bucket { long globalOrd; @@ -284,6 +291,8 @@ public class GlobalOrdinalsStringTermsAggregator extends AbstractStringTermsAggr * This is only supported for the standard {@code terms} aggregation and * doesn't support {@code significant_terms} so this forces * {@link StandardTermsResults}. + * + * @opensearch.internal */ static class LowCardinality extends GlobalOrdinalsStringTermsAggregator { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/IncludeExclude.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/IncludeExclude.java index 4464e4eb547..ea4ee87f28a 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/IncludeExclude.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/IncludeExclude.java @@ -162,16 +162,29 @@ public class IncludeExclude implements Writeable, ToXContentFragment { } } + /** + * Base filter class + * + * @opensearch.internal + */ public abstract static class Filter {} - // The includeValue and excludeValue ByteRefs which are the result of the parsing - // process are converted into a LongFilter when used on numeric fields - // in the index. + /** + * The includeValue and excludeValue ByteRefs which are the result of the parsing + * process are converted into a LongFilter when used on numeric fields + * in the index. + * + * @opensearch.internal + */ public abstract static class LongFilter extends Filter { public abstract boolean accept(long value); - } + /** + * Long filter that is partitioned + * + * @opensearch.internal + */ public class PartitionedLongFilter extends LongFilter { @Override public boolean accept(long value) { @@ -181,6 +194,11 @@ public class IncludeExclude implements Writeable, ToXContentFragment { } } + /** + * Long filter backed by valid values + * + * @opensearch.internal + */ public static class SetBackedLongFilter extends LongFilter { private LongSet valids; private LongSet invalids; @@ -208,7 +226,11 @@ public class IncludeExclude implements Writeable, ToXContentFragment { } } - // Only used for the 'map' execution mode (ie. scripts) + /** + * Only used for the 'map' execution mode (ie. scripts) + * + * @opensearch.internal + */ public abstract static class StringFilter extends Filter { public abstract boolean accept(BytesRef value); } @@ -220,6 +242,11 @@ public class IncludeExclude implements Writeable, ToXContentFragment { } } + /** + * String filter backed by an automaton + * + * @opensearch.internal + */ static class AutomatonBackedStringFilter extends StringFilter { private final ByteRunAutomaton runAutomaton; @@ -237,6 +264,11 @@ public class IncludeExclude implements Writeable, ToXContentFragment { } } + /** + * String filter backed by a term list + * + * @opensearch.internal + */ static class TermListBackedStringFilter extends StringFilter { private final Set valids; @@ -257,6 +289,11 @@ public class IncludeExclude implements Writeable, ToXContentFragment { } } + /** + * An ordinals filter + * + * @opensearch.internal + */ public abstract static class OrdinalsFilter extends Filter { public abstract LongBitSet acceptedGlobalOrdinals(SortedSetDocValues globalOrdinals) throws IOException; @@ -284,6 +321,11 @@ public class IncludeExclude implements Writeable, ToXContentFragment { } } + /** + * An ordinals filter backed by an automaton + * + * @opensearch.internal + */ static class AutomatonBackedOrdinalsFilter extends OrdinalsFilter { private final CompiledAutomaton compiled; @@ -311,6 +353,11 @@ public class IncludeExclude implements Writeable, ToXContentFragment { } + /** + * An ordinals filter backed by a terms list + * + * @opensearch.internal + */ static class TermListBackedOrdinalsFilter extends OrdinalsFilter { private final SortedSet includeValues; @@ -508,6 +555,8 @@ public class IncludeExclude implements Writeable, ToXContentFragment { /** * Terms adapter around doc values. + * + * @opensearch.internal */ private static class DocValuesTerms extends Terms { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalMultiTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalMultiTerms.java index f9207fb17a4..c0422dffd7c 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalMultiTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalMultiTerms.java @@ -36,6 +36,8 @@ import java.util.stream.Collectors; public class InternalMultiTerms extends InternalTerms { /** * Internal Multi Terms Bucket. + * + * @opensearch.internal */ public static class Bucket extends InternalTerms.AbstractInternalBucket implements KeyComparable { @@ -193,6 +195,8 @@ public class InternalMultiTerms extends InternalTerms> { @SuppressWarnings({ "unchecked" }) diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalRareTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalRareTerms.java index 441a0783536..f6dbf17d546 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalRareTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalRareTerms.java @@ -60,12 +60,19 @@ public abstract class InternalRareTerms, B ext implements RareTerms { + /** + * Bucket for a rare terms agg + * + * @opensearch.internal + */ public abstract static class Bucket> extends InternalMultiBucketAggregation.InternalBucket implements RareTerms.Bucket, KeyComparable { /** * Reads a bucket. Should be a constructor reference. + * + * @opensearch.internal */ @FunctionalInterface public interface Reader> { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalSignificantTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalSignificantTerms.java index 80fd4e2f5dc..3e7a6210350 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalSignificantTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalSignificantTerms.java @@ -62,12 +62,19 @@ public abstract class InternalSignificantTerms> extends InternalMultiBucketAggregation.InternalBucket implements SignificantTerms.Bucket { /** * Reads a bucket. Should be a constructor reference. + * + * @opensearch.internal */ @FunctionalInterface public interface Reader> { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalTerms.java index a376d7fab90..68f25032a02 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/InternalTerms.java @@ -75,6 +75,11 @@ public abstract class InternalTerms, B extends Int protected static final ParseField DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME = new ParseField("doc_count_error_upper_bound"); protected static final ParseField SUM_OF_OTHER_DOC_COUNTS = new ParseField("sum_other_doc_count"); + /** + * Base internal multi bucket + * + * @opensearch.internal + */ public abstract static class AbstractInternalBucket extends InternalMultiBucketAggregation.InternalBucket implements Terms.Bucket { abstract void setDocCountError(long docCountError); @@ -83,9 +88,16 @@ public abstract class InternalTerms, B extends Int abstract boolean showDocCountError(); } + /** + * Base bucket class + * + * @opensearch.internal + */ public abstract static class Bucket> extends AbstractInternalBucket implements KeyComparable { /** * Reads a bucket. Should be a constructor reference. + * + * @opensearch.internal */ @FunctionalInterface public interface Reader> { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongKeyedBucketOrds.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongKeyedBucketOrds.java index d60c774adaa..bcf77ee194e 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongKeyedBucketOrds.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongKeyedBucketOrds.java @@ -100,6 +100,8 @@ public abstract class LongKeyedBucketOrds implements Releasable { /** * An iterator for buckets inside a particular {@code owningBucketOrd}. + * + * @opensearch.internal */ public interface BucketOrdsEnum { /** @@ -142,6 +144,8 @@ public abstract class LongKeyedBucketOrds implements Releasable { /** * Implementation that only works if it is collecting from a single bucket. + * + * @opensearch.internal */ public static class FromSingle extends LongKeyedBucketOrds { private final LongHash ords; @@ -221,6 +225,8 @@ public abstract class LongKeyedBucketOrds implements Releasable { /** * Implementation that works properly when collecting from many buckets. + * + * @opensearch.internal */ public static class FromMany extends LongKeyedBucketOrds { private final LongLongHash ords; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongRareTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongRareTerms.java index f65401f913a..4a18d0ea748 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongRareTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongRareTerms.java @@ -52,6 +52,11 @@ import java.util.Objects; public class LongRareTerms extends InternalMappedRareTerms { public static final String NAME = "lrareterms"; + /** + * Bucket for rare long valued terms + * + * @opensearch.internal + */ public static class Bucket extends InternalRareTerms.Bucket { long term; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongTerms.java index 2a927499432..d9e7ad18751 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/LongTerms.java @@ -53,6 +53,11 @@ import java.util.Objects; public class LongTerms extends InternalMappedTerms { public static final String NAME = "lterms"; + /** + * Bucket for long terms + * + * @opensearch.internal + */ public static class Bucket extends InternalTerms.Bucket { long term; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MapStringTermsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MapStringTermsAggregator.java index 2450a5a3692..8ef33667e97 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MapStringTermsAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MapStringTermsAggregator.java @@ -153,6 +153,8 @@ public class MapStringTermsAggregator extends AbstractStringTermsAggregator { /** * Abstaction on top of building collectors to fetch values. + * + * @opensearch.internal */ public interface CollectorSource extends Releasable { boolean needsScores(); @@ -166,6 +168,11 @@ public class MapStringTermsAggregator extends AbstractStringTermsAggregator { ) throws IOException; } + /** + * Consumer for the collector + * + * @opensearch.internal + */ @FunctionalInterface public interface CollectConsumer { void accept(LeafBucketCollector sub, int doc, long owningBucketOrd, BytesRef bytes) throws IOException; @@ -173,6 +180,8 @@ public class MapStringTermsAggregator extends AbstractStringTermsAggregator { /** * Fetch values from a {@link ValuesSource}. + * + * @opensearch.internal */ public static class ValuesSourceCollectorSource implements CollectorSource { private final ValuesSource valuesSource; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MultiTermsAggregationFactory.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MultiTermsAggregationFactory.java index 695972564f7..8a061c0fbf5 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MultiTermsAggregationFactory.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MultiTermsAggregationFactory.java @@ -159,6 +159,11 @@ public class MultiTermsAggregationFactory extends AggregatorFactory { ); } + /** + * Supplier for internal values source + * + * @opensearch.internal + */ public interface InternalValuesSourceSupplier { MultiTermsAggregator.InternalValuesSource build(Tuple config); } diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MultiTermsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MultiTermsAggregator.java index e5461ff7a03..45898a689a6 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MultiTermsAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/MultiTermsAggregator.java @@ -304,6 +304,8 @@ public class MultiTermsAggregator extends DeferableBucketAggregator { /** * Multi_Term ValuesSource, it is a collection of {@link InternalValuesSource} + * + * @opensearch.internal */ static class MultiTermsValuesSource { private final List valuesSources; @@ -354,6 +356,8 @@ public class MultiTermsAggregator extends DeferableBucketAggregator { /** * Factory for construct {@link InternalValuesSource}. + * + * @opensearch.internal */ static class InternalValuesSourceFactory { static InternalValuesSource bytesValuesSource(ValuesSource valuesSource, IncludeExclude.StringFilter includeExclude) { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedDoubleTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedDoubleTerms.java index 2ace6b637e6..d41e8ccf732 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedDoubleTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedDoubleTerms.java @@ -65,6 +65,11 @@ public class ParsedDoubleTerms extends ParsedTerms { return aggregation; } + /** + * Parsed bucket for double terms + * + * @opensearch.internal + */ public static class ParsedBucket extends ParsedTerms.ParsedBucket { private Double key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedLongRareTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedLongRareTerms.java index c66f3cd6768..634ed164dc5 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedLongRareTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedLongRareTerms.java @@ -65,6 +65,11 @@ public class ParsedLongRareTerms extends ParsedRareTerms { return aggregation; } + /** + * Parsed bucket for rare long values + * + * @opensearch.internal + */ public static class ParsedBucket extends ParsedRareTerms.ParsedBucket { private Long key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedLongTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedLongTerms.java index 45f51854aa6..1d2b17e7d91 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedLongTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedLongTerms.java @@ -65,6 +65,11 @@ public class ParsedLongTerms extends ParsedTerms { return aggregation; } + /** + * Parsed bucket for long term values + * + * @opensearch.internal + */ public static class ParsedBucket extends ParsedTerms.ParsedBucket { private Long key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedMultiTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedMultiTerms.java index 3e1c6f6533b..52199c6dbbf 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedMultiTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedMultiTerms.java @@ -41,6 +41,11 @@ public class ParsedMultiTerms extends ParsedTerms { return aggregation; } + /** + * Parsed bucket for multi terms + * + * @opensearch.internal + */ public static class ParsedBucket extends ParsedTerms.ParsedBucket { private List key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedRareTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedRareTerms.java index f1950282449..0af5347d290 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedRareTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedRareTerms.java @@ -85,6 +85,11 @@ public abstract class ParsedRareTerms extends ParsedMultiBucketAggregation PARSER.parse(parser, null), name); } + /** + * Parsed bucket for significant long values + * + * @opensearch.internal + */ public static class ParsedBucket extends ParsedSignificantTerms.ParsedBucket { private Long key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedSignificantStringTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedSignificantStringTerms.java index ce508687aed..7953a476e28 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedSignificantStringTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedSignificantStringTerms.java @@ -65,6 +65,11 @@ public class ParsedSignificantStringTerms extends ParsedSignificantTerms { return parseSignificantTermsXContent(() -> PARSER.parse(parser, null), name); } + /** + * Parsed bucket for significant string values + * + * @opensearch.internal + */ public static class ParsedBucket extends ParsedSignificantTerms.ParsedBucket { private BytesRef key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedSignificantTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedSignificantTerms.java index 1d6b64f3dcd..654086c2816 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedSignificantTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedSignificantTerms.java @@ -128,6 +128,11 @@ public abstract class ParsedSignificantTerms extends ParsedMultiBucketAggregatio ); } + /** + * Parsed bucket for significant values + * + * @opensearch.internal + */ public abstract static class ParsedBucket extends ParsedMultiBucketAggregation.ParsedBucket implements SignificantTerms.Bucket { protected long subsetDf; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedStringRareTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedStringRareTerms.java index ecf5bd84097..ee1b8f7e235 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedStringRareTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedStringRareTerms.java @@ -67,6 +67,11 @@ public class ParsedStringRareTerms extends ParsedRareTerms { return aggregation; } + /** + * Parsed bucket for rare string terms + * + * @opensearch.internal + */ public static class ParsedBucket extends ParsedRareTerms.ParsedBucket { private BytesRef key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedStringTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedStringTerms.java index c849d6c8c88..e5dfb7f9d07 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedStringTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedStringTerms.java @@ -67,6 +67,11 @@ public class ParsedStringTerms extends ParsedTerms { return aggregation; } + /** + * Parsed bucket for string values + * + * @opensearch.internal + */ public static class ParsedBucket extends ParsedTerms.ParsedBucket { private BytesRef key; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedTerms.java index 68de52a2531..841eddccc23 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/ParsedTerms.java @@ -109,6 +109,11 @@ public abstract class ParsedTerms extends ParsedMultiBucketAggregation parsedTerms.sumOtherDocCount = value, SUM_OF_OTHER_DOC_COUNTS); } + /** + * Base parsed bucket + * + * @opensearch.internal + */ public abstract static class ParsedBucket extends ParsedMultiBucketAggregation.ParsedBucket implements Terms.Bucket { boolean showDocCountError = false; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/RareTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/RareTerms.java index 6e26503c149..f930e199e8f 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/RareTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/RareTerms.java @@ -44,6 +44,8 @@ public interface RareTerms extends MultiBucketsAggregation { /** * A bucket that is associated with a single term + * + * @opensearch.internal */ interface Bucket extends MultiBucketsAggregation.Bucket { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/RareTermsAggregatorFactory.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/RareTermsAggregatorFactory.java index b689865ac8c..f15d0bd9bc6 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/RareTermsAggregatorFactory.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/RareTermsAggregatorFactory.java @@ -237,6 +237,11 @@ public class RareTermsAggregatorFactory extends ValuesSourceAggregatorFactory { ); } + /** + * Execution mode for rare terms agg + * + * @opensearch.internal + */ public enum ExecutionMode { MAP(new ParseField("map")) { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantLongTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantLongTerms.java index 6e2b48f5579..9106824d9df 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantLongTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantLongTerms.java @@ -51,6 +51,11 @@ import java.util.Objects; public class SignificantLongTerms extends InternalMappedSignificantTerms { public static final String NAME = "siglterms"; + /** + * Bucket for significant long values + * + * @opensearch.internal + */ static class Bucket extends InternalSignificantTerms.Bucket { long term; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantStringTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantStringTerms.java index 3795df964b0..9e9c7100c08 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantStringTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantStringTerms.java @@ -52,6 +52,11 @@ import java.util.Objects; public class SignificantStringTerms extends InternalMappedSignificantTerms { public static final String NAME = "sigsterms"; + /** + * Bucket for significant string values + * + * @opensearch.internal + */ public static class Bucket extends InternalSignificantTerms.Bucket { BytesRef termBytes; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTerms.java index a5d1c29b0ee..e2eeac18575 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTerms.java @@ -42,6 +42,11 @@ import java.util.List; */ public interface SignificantTerms extends MultiBucketsAggregation, Iterable { + /** + * Bucket for significant terms + * + * @opensearch.internal + */ interface Bucket extends MultiBucketsAggregation.Bucket { /** diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTermsAggregatorFactory.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTermsAggregatorFactory.java index ff35d128ef5..12b11dae336 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTermsAggregatorFactory.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTermsAggregatorFactory.java @@ -311,6 +311,11 @@ public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFac ); } + /** + * The execution mode for the significant terms agg + * + * @opensearch.internal + */ public enum ExecutionMode { MAP(new ParseField("map")) { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTextAggregatorFactory.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTextAggregatorFactory.java index a509cbfd49f..39711cf0901 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTextAggregatorFactory.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/SignificantTextAggregatorFactory.java @@ -173,6 +173,11 @@ public class SignificantTextAggregatorFactory extends AggregatorFactory { ); } + /** + * Collects significant text + * + * @opensearch.internal + */ private static class SignificantTextCollectorSource implements MapStringTermsAggregator.CollectorSource { private final SourceLookup sourceLookup; private final BigArrays bigArrays; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/StringRareTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/StringRareTerms.java index f6a925c5340..9b104758796 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/StringRareTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/StringRareTerms.java @@ -53,6 +53,11 @@ import java.util.Objects; public class StringRareTerms extends InternalMappedRareTerms { public static final String NAME = "srareterms"; + /** + * Bucket for rare string terms + * + * @opensearch.internal + */ public static class Bucket extends InternalRareTerms.Bucket { BytesRef termBytes; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/StringTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/StringTerms.java index 829ec07c910..c053c80a101 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/StringTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/StringTerms.java @@ -52,6 +52,11 @@ import java.util.Objects; public class StringTerms extends InternalMappedTerms { public static final String NAME = "sterms"; + /** + * Bucket for string terms + * + * @opensearch.internal + */ public static class Bucket extends InternalTerms.Bucket { BytesRef termBytes; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/Terms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/Terms.java index df2028c81b1..e2e07ffa6ae 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/Terms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/Terms.java @@ -45,6 +45,8 @@ public interface Terms extends MultiBucketsAggregation { /** * A bucket that is associated with a single term + * + * @opensearch.internal */ interface Bucket extends MultiBucketsAggregation.Bucket { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregator.java index d60d1609ae9..c63b410f2e4 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregator.java @@ -63,6 +63,11 @@ import java.util.Set; */ public abstract class TermsAggregator extends DeferableBucketAggregator { + /** + * Bucket count thresholds + * + * @opensearch.internal + */ public static class BucketCountThresholds implements Writeable, ToXContentFragment { private long minDocCount; private long shardMinDocCount; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregatorFactory.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregatorFactory.java index abbd7945bdd..50b1ae001db 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregatorFactory.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregatorFactory.java @@ -365,6 +365,11 @@ public class TermsAggregatorFactory extends ValuesSourceAggregatorFactory { } } + /** + * The execution mode for the terms agg + * + * @opensearch.internal + */ public enum ExecutionMode { MAP(new ParseField("map")) { diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedRareTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedRareTerms.java index 279bbf95641..1be7c82c26d 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedRareTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedRareTerms.java @@ -54,6 +54,11 @@ import static java.util.Collections.emptyList; public class UnmappedRareTerms extends InternalRareTerms { public static final String NAME = "umrareterms"; + /** + * Bucket for unmapped rare values + * + * @opensearch.internal + */ protected abstract static class Bucket extends InternalRareTerms.Bucket { private Bucket(long docCount, InternalAggregations aggregations, DocValueFormat formatter) { super(docCount, aggregations, formatter); diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedSignificantTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedSignificantTerms.java index 535a6b58059..35914e9ebed 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedSignificantTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedSignificantTerms.java @@ -60,6 +60,8 @@ public class UnmappedSignificantTerms extends InternalSignificantTerms { private Bucket( diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedTerms.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedTerms.java index 9b792720b49..164a3b1b7cf 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedTerms.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/UnmappedTerms.java @@ -57,6 +57,8 @@ public class UnmappedTerms extends InternalTerms { private Bucket( diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/ChiSquare.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/ChiSquare.java index 1597976986b..fd19fc8cfba 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/ChiSquare.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/ChiSquare.java @@ -108,6 +108,11 @@ public class ChiSquare extends NXYSignificanceHeuristic { return builder; } + /** + * Builder for a chi squared heuristic + * + * @opensearch.internal + */ public static class ChiSquareBuilder extends NXYSignificanceHeuristic.NXYBuilder { public ChiSquareBuilder(boolean includeNegatives, boolean backgroundIsSuperset) { super(includeNegatives, backgroundIsSuperset); diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/GND.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/GND.java index 4f315836d9b..23f3815f779 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/GND.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/GND.java @@ -127,6 +127,11 @@ public class GND extends NXYSignificanceHeuristic { return builder; } + /** + * Builder for a GND heuristic + * + * @opensearch.internal + */ public static class GNDBuilder extends NXYBuilder { public GNDBuilder(boolean backgroundIsSuperset) { super(true, backgroundIsSuperset); diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/JLHScore.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/JLHScore.java index 1b36947f72d..4032334eba6 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/JLHScore.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/JLHScore.java @@ -129,6 +129,11 @@ public class JLHScore extends SignificanceHeuristic { return getClass().hashCode(); } + /** + * Builder for a JLH Score heuristic + * + * @opensearch.internal + */ public static class JLHScoreBuilder implements SignificanceHeuristicBuilder { @Override diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java index 761e1cf31da..e9198f0f4d3 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/MutualInformation.java @@ -147,6 +147,11 @@ public class MutualInformation extends NXYSignificanceHeuristic { return builder; } + /** + * Builder for a Mutual Information heuristic + * + * @opensearch.internal + */ public static class MutualInformationBuilder extends NXYBuilder { public MutualInformationBuilder(boolean includeNegatives, boolean backgroundIsSuperset) { super(includeNegatives, backgroundIsSuperset); diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/NXYSignificanceHeuristic.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/NXYSignificanceHeuristic.java index e385bea5a7c..cdb13497653 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/NXYSignificanceHeuristic.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/NXYSignificanceHeuristic.java @@ -106,6 +106,11 @@ public abstract class NXYSignificanceHeuristic extends SignificanceHeuristic { return result; } + /** + * Frequencies for an NXY significance heuristic + * + * @opensearch.internal + */ protected static class Frequencies { double N00, N01, N10, N11, N0_, N1_, N_0, N_1, N; } @@ -194,6 +199,11 @@ public abstract class NXYSignificanceHeuristic extends SignificanceHeuristic { }; } + /** + * Builder for a NXY Significance heuristic + * + * @opensearch.internal + */ protected abstract static class NXYBuilder implements SignificanceHeuristicBuilder { protected boolean includeNegatives = true; protected boolean backgroundIsSuperset = true; diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/PercentageScore.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/PercentageScore.java index 5e976d0fd67..5041f7d35f2 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/PercentageScore.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/PercentageScore.java @@ -109,6 +109,11 @@ public class PercentageScore extends SignificanceHeuristic { return getClass().hashCode(); } + /** + * Builder for a Percentage Score heuristic + * + * @opensearch.internal + */ public static class PercentageScoreBuilder implements SignificanceHeuristicBuilder { @Override diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/ScriptHeuristic.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/ScriptHeuristic.java index 65f3ec4bd75..1f50e6ac9a5 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/ScriptHeuristic.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/heuristic/ScriptHeuristic.java @@ -65,8 +65,12 @@ public class ScriptHeuristic extends SignificanceHeuristic { private final Script script; - // This class holds an executable form of the script with private variables ready for execution - // on a single search thread. + /** + * This class holds an executable form of the script with private variables ready for execution + * on a single search thread. + * + * @opensearch.internal + */ static class ExecutableScriptHeuristic extends ScriptHeuristic { private final LongAccessor subsetSizeHolder; private final LongAccessor supersetSizeHolder; @@ -178,6 +182,11 @@ public class ScriptHeuristic extends SignificanceHeuristic { return Objects.equals(script, other.script); } + /** + * Accesses long values + * + * @opensearch.internal + */ public final class LongAccessor extends Number { public long value; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractHyperLogLog.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractHyperLogLog.java index 89b77eb840d..6b998fc8636 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractHyperLogLog.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractHyperLogLog.java @@ -5952,7 +5952,11 @@ public abstract class AbstractHyperLogLog extends AbstractCardinalityAlgorithm { return THRESHOLDS[p - 4]; } - /** Iterator over a HyperLogLog register */ + /** + * Iterator over a HyperLogLog register + * + * @opensearch.internal + */ public interface RunLenIterator { /** diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractLinearCounting.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractLinearCounting.java index 3b607b3a867..3f5f524c9c2 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractLinearCounting.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/AbstractLinearCounting.java @@ -102,7 +102,11 @@ public abstract class AbstractLinearCounting extends AbstractCardinalityAlgorith return (int) encoded; } - /** Iterator over the hash values */ + /** + * Iterator over the hash values + * + * @opensearch.internal + */ public interface HashesIterator { /** diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/CardinalityAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/CardinalityAggregator.java index 1c1530843a6..536a49de6f0 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/CardinalityAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/CardinalityAggregator.java @@ -201,12 +201,22 @@ public class CardinalityAggregator extends NumericMetricsAggregator.SingleValue add.accept("string_hashing_collectors_used", stringHashingCollectorsUsed); } + /** + * Collector for the cardinality agg + * + * @opensearch.internal + */ private abstract static class Collector extends LeafBucketCollector implements Releasable { public abstract void postCollect() throws IOException; } + /** + * Empty Collector for the Cardinality agg + * + * @opensearch.internal + */ private static class EmptyCollector extends Collector { @Override @@ -225,6 +235,11 @@ public class CardinalityAggregator extends NumericMetricsAggregator.SingleValue } } + /** + * Direct Collector for the cardinality agg + * + * @opensearch.internal + */ private static class DirectCollector extends Collector { private final MurmurHash3Values hashes; @@ -257,6 +272,11 @@ public class CardinalityAggregator extends NumericMetricsAggregator.SingleValue } + /** + * Ordinals Collector for the cardinality agg + * + * @opensearch.internal + */ private static class OrdinalsCollector extends Collector { private static final long SHALLOW_FIXEDBITSET_SIZE = RamUsageEstimator.shallowSizeOfInstance(FixedBitSet.class); @@ -345,6 +365,8 @@ public class CardinalityAggregator extends NumericMetricsAggregator.SingleValue /** * Representation of a list of hash values. There might be dups and there is no guarantee on the order. + * + * @opensearch.internal */ abstract static class MurmurHash3Values { @@ -375,6 +397,11 @@ public class CardinalityAggregator extends NumericMetricsAggregator.SingleValue return new Bytes(values); } + /** + * Long hash value + * + * @opensearch.internal + */ private static class Long extends MurmurHash3Values { private final SortedNumericDocValues values; @@ -399,6 +426,11 @@ public class CardinalityAggregator extends NumericMetricsAggregator.SingleValue } } + /** + * Double hash value + * + * @opensearch.internal + */ private static class Double extends MurmurHash3Values { private final SortedNumericDoubleValues values; @@ -423,6 +455,11 @@ public class CardinalityAggregator extends NumericMetricsAggregator.SingleValue } } + /** + * Byte hash value + * + * @opensearch.internal + */ private static class Bytes extends MurmurHash3Values { private final MurmurHash3.Hash128 hash = new MurmurHash3.Hash128(); diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/ExtendedStats.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/ExtendedStats.java index 36e9c1f9386..811a7e08cae 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/ExtendedStats.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/ExtendedStats.java @@ -118,6 +118,11 @@ public interface ExtendedStats extends Stats { */ String getVarianceSamplingAsString(); + /** + * The bounds of the extended stats + * + * @opensearch.internal + */ enum Bounds { UPPER, LOWER, diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/ExtendedStatsAggregatorProvider.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/ExtendedStatsAggregatorProvider.java index 88cdf60b7ae..3c19c0b5867 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/ExtendedStatsAggregatorProvider.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/ExtendedStatsAggregatorProvider.java @@ -40,6 +40,8 @@ import java.util.Map; /** * Base supplier of an ExtendesStats aggregator + * + * @opensearch.internal */ public interface ExtendedStatsAggregatorProvider { diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlus.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlus.java index bfc121627bf..1e33b78d3f6 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlus.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlus.java @@ -225,6 +225,11 @@ public final class HyperLogLogPlusPlus extends AbstractHyperLogLogPlusPlus { } } + /** + * The hyper log log + * + * @opensearch.internal + */ private static class HyperLogLog extends AbstractHyperLogLog implements Releasable { private final BigArrays bigArrays; private final HyperLogLogIterator iterator; @@ -269,6 +274,11 @@ public final class HyperLogLogPlusPlus extends AbstractHyperLogLogPlusPlus { } } + /** + * Iterator for hyper log log + * + * @opensearch.internal + */ private static class HyperLogLogIterator implements AbstractHyperLogLog.RunLenIterator { private final HyperLogLog hll; @@ -304,6 +314,11 @@ public final class HyperLogLogPlusPlus extends AbstractHyperLogLogPlusPlus { } } + /** + * The plus plus + * + * @opensearch.internal + */ private static class LinearCounting extends AbstractLinearCounting implements Releasable { protected final int threshold; @@ -397,6 +412,11 @@ public final class HyperLogLogPlusPlus extends AbstractHyperLogLogPlusPlus { } } + /** + * The plus plus iterator + * + * @opensearch.internal + */ private static class LinearCountingIterator implements AbstractLinearCounting.HashesIterator { private final LinearCounting lc; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlusSparse.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlusSparse.java index 9a042726423..252df7358dd 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlusSparse.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/HyperLogLogPlusPlusSparse.java @@ -98,6 +98,11 @@ final class HyperLogLogPlusPlusSparse extends AbstractHyperLogLogPlusPlus implem lc.addEncoded(bucket, encoded); } + /** + * The plus plus + * + * @opensearch.internal + */ private static class LinearCounting extends AbstractLinearCounting implements Releasable { private final int capacity; @@ -189,6 +194,11 @@ final class HyperLogLogPlusPlusSparse extends AbstractHyperLogLogPlusPlus implem } } + /** + * The plus plus iterator + * + * @opensearch.internal + */ private static class LinearCountingIterator implements AbstractLinearCounting.HashesIterator { private final LinearCounting lc; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalExtendedStats.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalExtendedStats.java index 75a4dbb4e74..cfc6e06b2cb 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalExtendedStats.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalExtendedStats.java @@ -48,6 +48,11 @@ import java.util.Objects; * @opensearch.internal */ public class InternalExtendedStats extends InternalStats implements ExtendedStats { + /** + * The metrics for the extended stats + * + * @opensearch.internal + */ enum Metrics { count, @@ -304,6 +309,11 @@ public class InternalExtendedStats extends InternalStats implements ExtendedStat ); } + /** + * Fields for internal extended stats + * + * @opensearch.internal + */ static class Fields { public static final String SUM_OF_SQRS = "sum_of_squares"; public static final String SUM_OF_SQRS_AS_STRING = "sum_of_squares_as_string"; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalGeoCentroid.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalGeoCentroid.java index 262f8cc8901..96e7541de25 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalGeoCentroid.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalGeoCentroid.java @@ -177,6 +177,11 @@ public class InternalGeoCentroid extends InternalAggregation implements GeoCentr } } + /** + * Fields for geo centroid + * + * @opensearch.internal + */ static class Fields { static final ParseField CENTROID = new ParseField("location"); static final ParseField COUNT = new ParseField("count"); diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalHDRPercentileRanks.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalHDRPercentileRanks.java index ba3c917d1b5..f517fb678e4 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalHDRPercentileRanks.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalHDRPercentileRanks.java @@ -114,6 +114,11 @@ public class InternalHDRPercentileRanks extends AbstractInternalHDRPercentiles i return percentileRank; } + /** + * Terator for HDR percentile ranks agg + * + * @opensearch.internal + */ public static class Iter implements Iterator { private final double[] values; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalHDRPercentiles.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalHDRPercentiles.java index 2b1da638749..6bfab8c26ac 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalHDRPercentiles.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalHDRPercentiles.java @@ -104,6 +104,11 @@ public class InternalHDRPercentiles extends AbstractInternalHDRPercentiles imple return new InternalHDRPercentiles(name, keys, merged, keyed, format, metadata); } + /** + * Iterator for HDR percentiles + * + * @opensearch.internal + */ public static class Iter implements Iterator { private final double[] percents; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalNumericMetricsAggregation.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalNumericMetricsAggregation.java index 2c66321ecb3..2ef86786d4b 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalNumericMetricsAggregation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalNumericMetricsAggregation.java @@ -53,6 +53,11 @@ public abstract class InternalNumericMetricsAggregation extends InternalAggregat protected DocValueFormat format = DEFAULT_FORMAT; + /** + * A single numeric metric value + * + * @opensearch.internal + */ public abstract static class SingleValue extends InternalNumericMetricsAggregation implements NumericMetricsAggregation.SingleValue { protected SingleValue(String name, Map metadata) { super(name, metadata); @@ -96,6 +101,11 @@ public abstract class InternalNumericMetricsAggregation extends InternalAggregat } } + /** + * Multe numeric metric values + * + * @opensearch.internal + */ public abstract static class MultiValue extends InternalNumericMetricsAggregation implements NumericMetricsAggregation.MultiValue { protected MultiValue(String name, Map metadata) { super(name, metadata); diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalStats.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalStats.java index 6bd48f22134..f9407a02154 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalStats.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalStats.java @@ -48,6 +48,11 @@ import java.util.Objects; * @opensearch.internal */ public class InternalStats extends InternalNumericMetricsAggregation.MultiValue implements Stats { + /** + * The metrics for the internal stats + * + * @opensearch.internal + */ enum Metrics { count, @@ -195,6 +200,11 @@ public class InternalStats extends InternalNumericMetricsAggregation.MultiValue return new InternalStats(name, count, kahanSummation.value(), min, max, format, getMetadata()); } + /** + * Fields for stats agg + * + * @opensearch.internal + */ static class Fields { public static final String COUNT = "count"; public static final String MIN = "min"; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTDigestPercentileRanks.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTDigestPercentileRanks.java index 45ce6dc3ead..a87564c0a47 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTDigestPercentileRanks.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTDigestPercentileRanks.java @@ -110,6 +110,11 @@ public class InternalTDigestPercentileRanks extends AbstractInternalTDigestPerce return percentileRank * 100; } + /** + * Iter for the TDigest percentile ranks agg + * + * @opensearch.internal + */ public static class Iter implements Iterator { private final double[] values; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTDigestPercentiles.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTDigestPercentiles.java index 8cc224f2f08..cbcb3f0bbca 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTDigestPercentiles.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/InternalTDigestPercentiles.java @@ -100,6 +100,11 @@ public class InternalTDigestPercentiles extends AbstractInternalTDigestPercentil return new InternalTDigestPercentiles(name, keys, merged, keyed, format, metadata); } + /** + * Iter for the TDigest percentiles agg + * + * @opensearch.internal + */ public static class Iter implements Iterator { private final double[] percents; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/NumericMetricsAggregation.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/NumericMetricsAggregation.java index 88e292f4d4b..d36976d8b70 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/NumericMetricsAggregation.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/NumericMetricsAggregation.java @@ -41,6 +41,11 @@ import org.opensearch.search.aggregations.Aggregation; */ public interface NumericMetricsAggregation extends Aggregation { + /** + * A single value for the metrics agg + * + * @opensearch.internal + */ interface SingleValue extends NumericMetricsAggregation { double value(); @@ -49,5 +54,10 @@ public interface NumericMetricsAggregation extends Aggregation { } + /** + * Multi values in a numeric metrics agg + * + * @opensearch.internal + */ interface MultiValue extends NumericMetricsAggregation {} } diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/NumericMetricsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/NumericMetricsAggregator.java index 96d2d525e83..f90e5a09238 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/NumericMetricsAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/NumericMetricsAggregator.java @@ -51,6 +51,11 @@ public abstract class NumericMetricsAggregator extends MetricsAggregator { super(name, context, parent, metadata); } + /** + * Single numeric metric agg value + * + * @opensearch.internal + */ public abstract static class SingleValue extends NumericMetricsAggregator { protected SingleValue(String name, SearchContext context, Aggregator parent, Map metadata) throws IOException { @@ -75,6 +80,11 @@ public abstract class NumericMetricsAggregator extends MetricsAggregator { } } + /** + * Multi numeric metric agg value + * + * @opensearch.internal + */ public abstract static class MultiValue extends NumericMetricsAggregator { protected MultiValue(String name, SearchContext context, Aggregator parent, Map metadata) throws IOException { diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/PercentilesConfig.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/PercentilesConfig.java index f20cf2eb223..95b38fcd8cc 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/PercentilesConfig.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/PercentilesConfig.java @@ -123,6 +123,11 @@ public abstract class PercentilesConfig implements ToXContent, Writeable { return Objects.hash(method); } + /** + * The TDigest + * + * @opensearch.internal + */ public static class TDigest extends PercentilesConfig { static final double DEFAULT_COMPRESSION = 100.0; private double compression; @@ -219,6 +224,11 @@ public abstract class PercentilesConfig implements ToXContent, Writeable { } } + /** + * The HDR value + * + * @opensearch.internal + */ public static class Hdr extends PercentilesConfig { static final int DEFAULT_NUMBER_SIG_FIGS = 3; private int numberOfSignificantValueDigits; diff --git a/server/src/main/java/org/opensearch/search/aggregations/metrics/TopHitsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/metrics/TopHitsAggregator.java index 2964ede7979..414d2e6e99b 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/metrics/TopHitsAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/metrics/TopHitsAggregator.java @@ -77,6 +77,11 @@ import java.util.Map; */ class TopHitsAggregator extends MetricsAggregator { + /** + * Collectors for top hits + * + * @opensearch.internal + */ private static class Collectors { public final TopDocsCollector topDocsCollector; public final MaxScoreCollector maxScoreCollector; diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/BucketHelpers.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/BucketHelpers.java index d7f82f36a3a..3d63a31f247 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/BucketHelpers.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/BucketHelpers.java @@ -67,6 +67,8 @@ public class BucketHelpers { * * "insert_zeros": empty buckets will be filled with zeros for all metrics * "skip": empty buckets will simply be ignored + * + * @opensearch.internal */ public enum GapPolicy implements Writeable { INSERT_ZEROS((byte) 0, "insert_zeros"), diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/EwmaModel.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/EwmaModel.java index 1fc86dce353..440d1caddbd 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/EwmaModel.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/EwmaModel.java @@ -153,6 +153,11 @@ public class EwmaModel extends MovAvgModel { return Objects.equals(alpha, other.alpha); } + /** + * Builder for the EWMA model + * + * @opensearch.internal + */ public static class EWMAModelBuilder implements MovAvgModelBuilder { private double alpha = DEFAULT_ALPHA; diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/HoltLinearModel.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/HoltLinearModel.java index 510f3396cf8..8b94a45b467 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/HoltLinearModel.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/HoltLinearModel.java @@ -195,6 +195,11 @@ public class HoltLinearModel extends MovAvgModel { return Objects.equals(alpha, other.alpha) && Objects.equals(beta, other.beta); } + /** + * Builder for the holt linear model + * + * @opensearch.internal + */ public static class HoltLinearModelBuilder implements MovAvgModelBuilder { private double alpha = DEFAULT_ALPHA; private double beta = DEFAULT_BETA; diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/HoltWintersModel.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/HoltWintersModel.java index 1dccb17d78b..34371a6502d 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/HoltWintersModel.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/HoltWintersModel.java @@ -63,6 +63,11 @@ public class HoltWintersModel extends MovAvgModel { private static final SeasonalityType DEFAULT_SEASONALITY_TYPE = SeasonalityType.ADDITIVE; private static final boolean DEFAULT_PAD = false; + /** + * The seasonality type + * + * @opensearch.internal + */ public enum SeasonalityType { ADDITIVE((byte) 0, "add"), MULTIPLICATIVE((byte) 1, "mult"); @@ -392,6 +397,11 @@ public class HoltWintersModel extends MovAvgModel { && Objects.equals(pad, other.pad); } + /** + * Builder for the holt winters model + * + * @opensearch.internal + */ public static class HoltWintersModelBuilder implements MovAvgModelBuilder { private double alpha = DEFAULT_ALPHA; diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/InternalPercentilesBucket.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/InternalPercentilesBucket.java index 95028c5a560..40c7a579145 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/InternalPercentilesBucket.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/InternalPercentilesBucket.java @@ -209,6 +209,11 @@ public class InternalPercentilesBucket extends InternalNumericMetricsAggregation return Objects.hash(super.hashCode(), Arrays.hashCode(percents), Arrays.hashCode(percentiles)); } + /** + * Iterator for the percentiles agg + * + * @opensearch.internal + */ public static class Iter implements Iterator { private final double[] percents; diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/LinearModel.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/LinearModel.java index 1595c0f5f45..f1b47730a55 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/LinearModel.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/LinearModel.java @@ -113,6 +113,11 @@ public class LinearModel extends MovAvgModel { } }; + /** + * Builder for the linear model + * + * @opensearch.internal + */ public static class LinearModelBuilder implements MovAvgModelBuilder { @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/MovAvgModel.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/MovAvgModel.java index 6b7497235ef..b629be21b76 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/MovAvgModel.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/MovAvgModel.java @@ -158,6 +158,8 @@ public abstract class MovAvgModel implements NamedWriteable, ToXContentFragment /** * Abstract class which also provides some concrete parsing functionality. + * + * @opensearch.internal */ public abstract static class AbstractModelParser { /** diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/MovingFunctionScript.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/MovingFunctionScript.java index ff5a4f254e6..20dd463a3cc 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/MovingFunctionScript.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/MovingFunctionScript.java @@ -51,6 +51,11 @@ public abstract class MovingFunctionScript { */ public abstract double execute(Map params, double[] values); + /** + * Factory interface + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { MovingFunctionScript newInstance(); } diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/PipelineAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/PipelineAggregator.java index da4a3b90b27..4b1134d9e1a 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/PipelineAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/PipelineAggregator.java @@ -57,6 +57,8 @@ import static java.util.Collections.emptyMap; public abstract class PipelineAggregator implements NamedWriteable { /** * Parse the {@link PipelineAggregationBuilder} from a {@link XContentParser}. + * + * @opensearch.internal */ @FunctionalInterface public interface Parser { @@ -81,6 +83,8 @@ public abstract class PipelineAggregator implements NamedWriteable { /** * Tree of {@link PipelineAggregator}s to modify a tree of aggregations * after their final reduction. + * + * @opensearch.internal */ public static class PipelineTree { /** diff --git a/server/src/main/java/org/opensearch/search/aggregations/pipeline/SimpleModel.java b/server/src/main/java/org/opensearch/search/aggregations/pipeline/SimpleModel.java index 4336311c82b..0850d1eeb40 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/pipeline/SimpleModel.java +++ b/server/src/main/java/org/opensearch/search/aggregations/pipeline/SimpleModel.java @@ -112,6 +112,11 @@ public class SimpleModel extends MovAvgModel { } }; + /** + * Builder for the simple model + * + * @opensearch.internal + */ public static class SimpleModelBuilder implements MovAvgModelBuilder { @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/AggregationPath.java b/server/src/main/java/org/opensearch/search/aggregations/support/AggregationPath.java index d93d8049331..2bdb561879b 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/AggregationPath.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/AggregationPath.java @@ -128,6 +128,11 @@ public class AggregationPath { return new AggregationPath(tokens); } + /** + * Element in an agg path + * + * @opensearch.internal + */ public static class PathElement { private final String fullName; diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/AggregationUsageService.java b/server/src/main/java/org/opensearch/search/aggregations/support/AggregationUsageService.java index f9b6a914448..eba64998014 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/AggregationUsageService.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/AggregationUsageService.java @@ -49,6 +49,11 @@ public class AggregationUsageService implements ReportingService> aggs; diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/BaseMultiValuesSourceFieldConfig.java b/server/src/main/java/org/opensearch/search/aggregations/support/BaseMultiValuesSourceFieldConfig.java index 8527eaae2ec..b7e157b6050 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/BaseMultiValuesSourceFieldConfig.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/BaseMultiValuesSourceFieldConfig.java @@ -171,6 +171,11 @@ public abstract class BaseMultiValuesSourceFieldConfig implements Writeable, ToX abstract void doWriteTo(StreamOutput out) throws IOException; + /** + * Base builder for the multi values source field configuration + * + * @opensearch.internal + */ public abstract static class Builder> { String fieldName; Object missing = null; diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/MultiTermsValuesSourceConfig.java b/server/src/main/java/org/opensearch/search/aggregations/support/MultiTermsValuesSourceConfig.java index def1191c70f..b0c828ca6b9 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/MultiTermsValuesSourceConfig.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/MultiTermsValuesSourceConfig.java @@ -36,6 +36,11 @@ public class MultiTermsValuesSourceConfig extends BaseMultiValuesSourceFieldConf private static final String NAME = "field_config"; public static final ParseField FILTER = new ParseField("filter"); + /** + * Parser supplier function + * + * @opensearch.internal + */ public interface ParserSupplier { ObjectParser apply( Boolean scriptable, @@ -156,6 +161,11 @@ public class MultiTermsValuesSourceConfig extends BaseMultiValuesSourceFieldConf return Objects.hash(super.hashCode(), userValueTypeHint, format, includeExclude); } + /** + * Builder for the multi terms values source configuration + * + * @opensearch.internal + */ public static class Builder extends BaseMultiValuesSourceFieldConfig.Builder { private ValueType userValueTypeHint = null; private String format; diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSource.java b/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSource.java index 3ef949c6eeb..0889a1c90d1 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSource.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSource.java @@ -49,6 +49,11 @@ import java.util.Objects; public abstract class MultiValuesSource { protected Map values; + /** + * Numeric format + * + * @opensearch.internal + */ public static class NumericMultiValuesSource extends MultiValuesSource { public NumericMultiValuesSource(Map valuesSourceConfigs, QueryShardContext context) { values = new HashMap<>(valuesSourceConfigs.size()); diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSourceAggregationBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSourceAggregationBuilder.java index 7573f69e083..a49fd83b9df 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSourceAggregationBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSourceAggregationBuilder.java @@ -59,6 +59,11 @@ import java.util.Objects; public abstract class MultiValuesSourceAggregationBuilder> extends AbstractAggregationBuilder { + /** + * Base leaf only class + * + * @opensearch.internal + */ public abstract static class LeafOnly> extends MultiValuesSourceAggregationBuilder< AB> { diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSourceFieldConfig.java b/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSourceFieldConfig.java index a7145ac8713..63fce83369c 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSourceFieldConfig.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/MultiValuesSourceFieldConfig.java @@ -130,6 +130,11 @@ public class MultiValuesSourceFieldConfig extends BaseMultiValuesSourceFieldConf return Objects.hash(super.hashCode(), filter); } + /** + * Builder for the field config + * + * @opensearch.internal + */ public static class Builder extends BaseMultiValuesSourceFieldConfig.Builder { private QueryBuilder filter = null; diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSource.java b/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSource.java index 9bcf7df85d0..ba9e1fcb3cc 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSource.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSource.java @@ -103,6 +103,11 @@ public abstract class ValuesSource { return false; } + /** + * Range type + * + * @opensearch.internal + */ public static class Range extends ValuesSource { private final RangeType rangeType; protected final IndexFieldData indexFieldData; @@ -134,6 +139,11 @@ public abstract class ValuesSource { } } + /** + * Bytes type + * + * @opensearch.internal + */ public abstract static class Bytes extends ValuesSource { @Override @@ -147,6 +157,11 @@ public abstract class ValuesSource { throw new AggregationExecutionException("can't round a [BYTES]"); } + /** + * Provides ordinals for bytes + * + * @opensearch.internal + */ public abstract static class WithOrdinals extends Bytes { public static final WithOrdinals EMPTY = new WithOrdinals() { @@ -211,6 +226,11 @@ public abstract class ValuesSource { } } + /** + * Field data for the bytes values source + * + * @opensearch.internal + */ public static class FieldData extends WithOrdinals { protected final IndexOrdinalsFieldData indexFieldData; @@ -257,6 +277,11 @@ public abstract class ValuesSource { } } + /** + * Field data without ordinals + * + * @opensearch.internal + */ public static class FieldData extends Bytes { protected final IndexFieldData indexFieldData; @@ -274,6 +299,8 @@ public abstract class ValuesSource { /** * {@link ValuesSource} implementation for stand alone scripts returning a Bytes value + * + * @opensearch.internal */ public static class Script extends Bytes { @@ -297,6 +324,8 @@ public abstract class ValuesSource { // No need to implement ReaderContextAware here, the delegate already takes care of updating data structures /** * {@link ValuesSource} subclass for Bytes fields with a Value Script applied + * + * @opensearch.internal */ public static class WithScript extends Bytes { @@ -318,6 +347,11 @@ public abstract class ValuesSource { return new BytesValues(delegate.bytesValues(context), script.newInstance(context)); } + /** + * Bytes values + * + * @opensearch.internal + */ static class BytesValues extends SortingBinaryDocValues implements ScorerAware { private final SortedBinaryDocValues bytesValues; @@ -358,6 +392,11 @@ public abstract class ValuesSource { } } + /** + * Numeric values source type + * + * @opensearch.internal + */ public abstract static class Numeric extends ValuesSource { public static final Numeric EMPTY = new Numeric() { @@ -411,6 +450,8 @@ public abstract class ValuesSource { /** * {@link ValuesSource} subclass for Numeric fields with a Value Script applied + * + * @opensearch.internal */ public static class WithScript extends Numeric { @@ -447,6 +488,11 @@ public abstract class ValuesSource { return new DoubleValues(delegate.doubleValues(context), script.newInstance(context)); } + /** + * Long values source type + * + * @opensearch.internal + */ static class LongValues extends AbstractSortingNumericDocValues implements ScorerAware { private final SortedNumericDocValues longValues; @@ -478,6 +524,11 @@ public abstract class ValuesSource { } } + /** + * Double values source type + * + * @opensearch.internal + */ static class DoubleValues extends SortingNumericDoubleValues implements ScorerAware { private final SortedNumericDoubleValues doubleValues; @@ -510,6 +561,11 @@ public abstract class ValuesSource { } } + /** + * Field data for numerics + * + * @opensearch.internal + */ public static class FieldData extends Numeric { protected final IndexNumericFieldData indexFieldData; @@ -541,6 +597,8 @@ public abstract class ValuesSource { /** * {@link ValuesSource} implementation for stand alone scripts returning a Numeric value + * + * @opensearch.internal */ public static class Script extends Numeric { private final AggregationScript.LeafFactory script; @@ -579,6 +637,11 @@ public abstract class ValuesSource { } + /** + * Geo point values source + * + * @opensearch.internal + */ public abstract static class GeoPoint extends ValuesSource { public static final GeoPoint EMPTY = new GeoPoint() { @@ -608,6 +671,11 @@ public abstract class ValuesSource { public abstract MultiGeoPointValues geoPointValues(LeafReaderContext context); + /** + * Field data for geo point values source + * + * @opensearch.internal + */ public static class Fielddata extends GeoPoint { protected final IndexGeoPointFieldData indexFieldData; diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSourceAggregationBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSourceAggregationBuilder.java index 5eb880642b9..52afc6435d5 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSourceAggregationBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSourceAggregationBuilder.java @@ -140,6 +140,11 @@ public abstract class ValuesSourceAggregationBuilder> extends ValuesSourceAggregationBuilder { diff --git a/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSourceRegistry.java b/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSourceRegistry.java index 430accde5c2..0cb5a12bac4 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSourceRegistry.java +++ b/server/src/main/java/org/opensearch/search/aggregations/support/ValuesSourceRegistry.java @@ -53,6 +53,11 @@ import java.util.stream.Collectors; */ public class ValuesSourceRegistry { + /** + * The registry key for the values source registry key + * + * @opensearch.internal + */ public static final class RegistryKey { private final String name; private final Class supplierType; @@ -82,6 +87,11 @@ public class ValuesSourceRegistry { public static final RegistryKey UNREGISTERED_KEY = new RegistryKey("unregistered", RegistryKey.class); + /** + * Builder for the values source registry + * + * @opensearch.internal + */ public static class Builder { private final AggregationUsageService.Builder usageServiceBuilder; private Map, List>> aggregatorRegistry = new HashMap<>(); diff --git a/server/src/main/java/org/opensearch/search/builder/SearchSourceBuilder.java b/server/src/main/java/org/opensearch/search/builder/SearchSourceBuilder.java index 88281b12f47..d3b131cf9f7 100644 --- a/server/src/main/java/org/opensearch/search/builder/SearchSourceBuilder.java +++ b/server/src/main/java/org/opensearch/search/builder/SearchSourceBuilder.java @@ -1471,6 +1471,11 @@ public final class SearchSourceBuilder implements Writeable, ToXContentObject, R return builder; } + /** + * Boosts on an index + * + * @opensearch.internal + */ public static class IndexBoost implements Writeable, ToXContentObject { private final String index; private final float boost; @@ -1567,6 +1572,11 @@ public final class SearchSourceBuilder implements Writeable, ToXContentObject, R } + /** + * Script field + * + * @opensearch.internal + */ public static class ScriptField implements Writeable, ToXContentFragment { private final boolean ignoreFailure; diff --git a/server/src/main/java/org/opensearch/search/fetch/FetchSubPhase.java b/server/src/main/java/org/opensearch/search/fetch/FetchSubPhase.java index 744505ec98c..fa30b2a5c74 100644 --- a/server/src/main/java/org/opensearch/search/fetch/FetchSubPhase.java +++ b/server/src/main/java/org/opensearch/search/fetch/FetchSubPhase.java @@ -47,6 +47,11 @@ import java.io.IOException; */ public interface FetchSubPhase { + /** + * The hit context for the fetch subphase + * + * @opensearch.internal + */ class HitContext { private final SearchHit hit; private final LeafReaderContext readerContext; diff --git a/server/src/main/java/org/opensearch/search/fetch/subphase/ScriptFieldsContext.java b/server/src/main/java/org/opensearch/search/fetch/subphase/ScriptFieldsContext.java index 04bbe945766..78c35098d9c 100644 --- a/server/src/main/java/org/opensearch/search/fetch/subphase/ScriptFieldsContext.java +++ b/server/src/main/java/org/opensearch/search/fetch/subphase/ScriptFieldsContext.java @@ -44,6 +44,11 @@ import java.util.List; */ public class ScriptFieldsContext { + /** + * Script field use in the script fields context + * + * @opensearch.internal + */ public static class ScriptField { private final String name; private final FieldScript.LeafFactory script; diff --git a/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/HighlightBuilder.java b/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/HighlightBuilder.java index 7c2cc5ae1de..a8a7d290c82 100644 --- a/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/HighlightBuilder.java +++ b/server/src/main/java/org/opensearch/search/fetch/subphase/highlight/HighlightBuilder.java @@ -469,6 +469,11 @@ public class HighlightBuilder extends AbstractHighlighterBuilder { static final NamedObjectParser PARSER; static { @@ -572,6 +577,11 @@ public class HighlightBuilder extends AbstractHighlighterBuilder { @@ -532,6 +541,11 @@ public abstract class BucketedSort implements Releasable { values.set(rhs, tmp); } + /** + * Leaf for doubles + * + * @opensearch.internal + */ protected abstract class Leaf extends BucketedSort.Leaf { protected Leaf(LeafReaderContext ctx) { super(ctx); @@ -625,6 +639,11 @@ public abstract class BucketedSort implements Releasable { values.set(rhs, tmp); } + /** + * Leaf for floats + * + * @opensearch.internal + */ protected abstract class Leaf extends BucketedSort.Leaf { protected Leaf(LeafReaderContext ctx) { super(ctx); @@ -704,6 +723,11 @@ public abstract class BucketedSort implements Releasable { values.set(rhs, tmp); } + /** + * Leaf for bucketed sort + * + * @opensearch.internal + */ protected abstract class Leaf extends BucketedSort.Leaf { protected Leaf(LeafReaderContext ctx) { super(ctx); diff --git a/server/src/main/java/org/opensearch/search/sort/ScriptSortBuilder.java b/server/src/main/java/org/opensearch/search/sort/ScriptSortBuilder.java index 6a412eb3b5e..685284dfe99 100644 --- a/server/src/main/java/org/opensearch/search/sort/ScriptSortBuilder.java +++ b/server/src/main/java/org/opensearch/search/sort/ScriptSortBuilder.java @@ -460,6 +460,11 @@ public class ScriptSortBuilder extends SortBuilder { return NAME; } + /** + * Sort type for scripting + * + * @opensearch.internal + */ public enum ScriptSortType implements Writeable { /** script sort for a string value **/ STRING, diff --git a/server/src/main/java/org/opensearch/search/suggest/SuggestionSearchContext.java b/server/src/main/java/org/opensearch/search/suggest/SuggestionSearchContext.java index 9b38c73692e..f0d8efc64b6 100644 --- a/server/src/main/java/org/opensearch/search/suggest/SuggestionSearchContext.java +++ b/server/src/main/java/org/opensearch/search/suggest/SuggestionSearchContext.java @@ -55,6 +55,11 @@ public class SuggestionSearchContext { return suggestions; } + /** + * The suggestion context + * + * @opensearch.internal + */ public abstract static class SuggestionContext { private BytesRef text; diff --git a/server/src/main/java/org/opensearch/search/suggest/completion/CompletionSuggestion.java b/server/src/main/java/org/opensearch/search/suggest/completion/CompletionSuggestion.java index e8245d46a62..95133585f99 100644 --- a/server/src/main/java/org/opensearch/search/suggest/completion/CompletionSuggestion.java +++ b/server/src/main/java/org/opensearch/search/suggest/completion/CompletionSuggestion.java @@ -256,6 +256,11 @@ public final class CompletionSuggestion extends Suggest.Suggestion { public Entry(Text text, int offset, int length) { @@ -287,6 +292,11 @@ public final class CompletionSuggestion extends Suggest.Suggestion> contexts; private final ScoreDoc doc; diff --git a/server/src/main/java/org/opensearch/search/suggest/completion/FuzzyOptions.java b/server/src/main/java/org/opensearch/search/suggest/completion/FuzzyOptions.java index 6c4a71a00e0..af7a07af58d 100644 --- a/server/src/main/java/org/opensearch/search/suggest/completion/FuzzyOptions.java +++ b/server/src/main/java/org/opensearch/search/suggest/completion/FuzzyOptions.java @@ -220,6 +220,8 @@ public class FuzzyOptions implements ToXContentFragment, Writeable { /** * Options for fuzzy queries + * + * @opensearch.internal */ public static class Builder { diff --git a/server/src/main/java/org/opensearch/search/suggest/completion/RegexOptions.java b/server/src/main/java/org/opensearch/search/suggest/completion/RegexOptions.java index fc33eda23a4..d832dc9d8d5 100644 --- a/server/src/main/java/org/opensearch/search/suggest/completion/RegexOptions.java +++ b/server/src/main/java/org/opensearch/search/suggest/completion/RegexOptions.java @@ -155,6 +155,8 @@ public class RegexOptions implements ToXContentFragment, Writeable { /** * Options for regular expression queries + * + * @opensearch.internal */ public static class Builder { private int flagsValue = RegExp.ALL; diff --git a/server/src/main/java/org/opensearch/search/suggest/completion/context/CategoryContextMapping.java b/server/src/main/java/org/opensearch/search/suggest/completion/context/CategoryContextMapping.java index 624e828d78b..dbefaff2b1a 100644 --- a/server/src/main/java/org/opensearch/search/suggest/completion/context/CategoryContextMapping.java +++ b/server/src/main/java/org/opensearch/search/suggest/completion/context/CategoryContextMapping.java @@ -219,6 +219,8 @@ public class CategoryContextMapping extends ContextMapping /** * Builder for {@link CategoryContextMapping} + * + * @opensearch.internal */ public static class Builder extends ContextBuilder { diff --git a/server/src/main/java/org/opensearch/search/suggest/completion/context/CategoryQueryContext.java b/server/src/main/java/org/opensearch/search/suggest/completion/context/CategoryQueryContext.java index bc31e885878..5a1b218eab5 100644 --- a/server/src/main/java/org/opensearch/search/suggest/completion/context/CategoryQueryContext.java +++ b/server/src/main/java/org/opensearch/search/suggest/completion/context/CategoryQueryContext.java @@ -151,6 +151,11 @@ public final class CategoryQueryContext implements ToXContentObject { return builder; } + /** + * Builder for the category query context + * + * @opensearch.internal + */ public static class Builder { private String category; private boolean isPrefix = false; diff --git a/server/src/main/java/org/opensearch/search/suggest/completion/context/ContextMapping.java b/server/src/main/java/org/opensearch/search/suggest/completion/context/ContextMapping.java index 3492da40edd..6b6588e125f 100644 --- a/server/src/main/java/org/opensearch/search/suggest/completion/context/ContextMapping.java +++ b/server/src/main/java/org/opensearch/search/suggest/completion/context/ContextMapping.java @@ -67,6 +67,11 @@ public abstract class ContextMapping implements ToXContent protected final Type type; protected final String name; + /** + * Type of context mapping + * + * @opensearch.internal + */ public enum Type { CATEGORY, GEO; @@ -189,6 +194,11 @@ public abstract class ContextMapping implements ToXContent } } + /** + * The internal query context + * + * @opensearch.internal + */ public static class InternalQueryContext { public final String context; public final int boost; diff --git a/server/src/main/java/org/opensearch/search/suggest/completion/context/GeoContextMapping.java b/server/src/main/java/org/opensearch/search/suggest/completion/context/GeoContextMapping.java index f191e371d67..e3b809dc57b 100644 --- a/server/src/main/java/org/opensearch/search/suggest/completion/context/GeoContextMapping.java +++ b/server/src/main/java/org/opensearch/search/suggest/completion/context/GeoContextMapping.java @@ -363,6 +363,11 @@ public class GeoContextMapping extends ContextMapping { return Objects.hash(super.hashCode(), precision, fieldName); } + /** + * Builder for geo context mapping + * + * @opensearch.internal + */ public static class Builder extends ContextBuilder { private int precision = DEFAULT_PRECISION; diff --git a/server/src/main/java/org/opensearch/search/suggest/completion/context/GeoQueryContext.java b/server/src/main/java/org/opensearch/search/suggest/completion/context/GeoQueryContext.java index d47c79747a8..b362d01304e 100644 --- a/server/src/main/java/org/opensearch/search/suggest/completion/context/GeoQueryContext.java +++ b/server/src/main/java/org/opensearch/search/suggest/completion/context/GeoQueryContext.java @@ -177,6 +177,11 @@ public final class GeoQueryContext implements ToXContentObject { return builder; } + /** + * Builder for the geo context + * + * @opensearch.internal + */ public static class Builder { private GeoPoint geoPoint; private int boost = 1; diff --git a/server/src/main/java/org/opensearch/search/suggest/phrase/DirectCandidateGenerator.java b/server/src/main/java/org/opensearch/search/suggest/phrase/DirectCandidateGenerator.java index c8ca01d6991..cbf1d332dfa 100644 --- a/server/src/main/java/org/opensearch/search/suggest/phrase/DirectCandidateGenerator.java +++ b/server/src/main/java/org/opensearch/search/suggest/phrase/DirectCandidateGenerator.java @@ -278,6 +278,11 @@ public final class DirectCandidateGenerator extends CandidateGenerator { return 0; } + /** + * Token consumer for a direct candidate + * + * @opensearch.internal + */ public abstract static class TokenConsumer { protected CharTermAttribute charTermAttr; protected PositionIncrementAttribute posIncAttr; @@ -299,6 +304,11 @@ public final class DirectCandidateGenerator extends CandidateGenerator { public void end() {} } + /** + * Candidate set of terms + * + * @opensearch.internal + */ public static class CandidateSet { public Candidate[] candidates; public final Candidate originalTerm; @@ -328,6 +338,11 @@ public final class DirectCandidateGenerator extends CandidateGenerator { } + /** + * Candidate term + * + * @opensearch.internal + */ public static class Candidate implements Comparable { public static final Candidate[] EMPTY = new Candidate[0]; public final BytesRef term; diff --git a/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestion.java b/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestion.java index 648d00e3509..4a2ff2388c0 100644 --- a/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestion.java +++ b/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestion.java @@ -87,6 +87,11 @@ public class PhraseSuggestion extends Suggest.Suggestion return suggestion; } + /** + * Entry in the phrase suggester + * + * @opensearch.internal + */ public static class Entry extends Suggestion.Entry { protected double cutoffScore = Double.MIN_VALUE; @@ -170,6 +175,11 @@ public class PhraseSuggestion extends Suggest.Suggestion return Objects.hash(super.hashCode(), cutoffScore); } + /** + * Options for phrase suggestion + * + * @opensearch.internal + */ public static class Option extends Suggestion.Entry.Option { public Option(Text text, Text highlighted, float score, Boolean collateMatch) { diff --git a/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestionBuilder.java b/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestionBuilder.java index ca9effe7222..dd9046e182c 100644 --- a/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestionBuilder.java +++ b/server/src/main/java/org/opensearch/search/suggest/phrase/PhraseSuggestionBuilder.java @@ -772,6 +772,8 @@ public class PhraseSuggestionBuilder extends SuggestionBuilder { } } - // Same behaviour as comparators in suggest module, but for SuggestedWord - // Highest score first, then highest freq first, then lowest term first + /** + * Same behaviour as comparators in suggest module, but for SuggestedWord + * Highest score first, then highest freq first, then lowest term first + * + * @opensearch.internal + */ public static class Score implements Comparator { @Override @@ -94,8 +98,12 @@ public class TermSuggestion extends Suggestion { } } - // Same behaviour as comparators in suggest module, but for SuggestedWord - // Highest freq first, then highest score first, then lowest term first + /** + * Same behaviour as comparators in suggest module, but for SuggestedWord + * Highest freq first, then highest score first, then lowest term first + * + * @opensearch.internal + */ public static class Frequency implements Comparator { @Override @@ -181,6 +189,8 @@ public class TermSuggestion extends Suggestion { /** * Represents a part from the suggest text with suggested options. + * + * @opensearch.internal */ public static class Entry extends Suggest.Suggestion.Entry { @@ -215,6 +225,8 @@ public class TermSuggestion extends Suggestion { /** * Contains the suggested text with its document frequency and score. + * + * @opensearch.internal */ public static class Option extends Suggest.Suggestion.Entry.Option { diff --git a/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestionBuilder.java b/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestionBuilder.java index 27916ef03e9..e53c27596e5 100644 --- a/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestionBuilder.java +++ b/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestionBuilder.java @@ -512,7 +512,11 @@ public class TermSuggestionBuilder extends SuggestionBuilderdamerau_levenshtein, but highly optimized * for comparing string distance for terms inside the index. */