From 114a3ee04d44518c41824294308d7ff3ab21ea24 Mon Sep 17 00:00:00 2001 From: Sarthak Aggarwal Date: Fri, 5 Jul 2024 15:18:02 +0530 Subject: [PATCH] fix annotations --- .../aggregators/MetricAggregatorInfo.java | 1 + .../startree/aggregators/ValueAggregator.java | 1 + .../numerictype/StarTreeNumericType.java | 1 + .../startree/utils/StarTreeBuilderUtils.java | 2 +- .../opensearch/index/mapper/MapperService.java | 17 ----------------- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/MetricAggregatorInfo.java b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/MetricAggregatorInfo.java index 3895b53fe7466..69b7f35b2d314 100644 --- a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/MetricAggregatorInfo.java +++ b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/MetricAggregatorInfo.java @@ -7,6 +7,7 @@ */ package org.opensearch.index.compositeindex.datacube.startree.aggregators; +import org.opensearch.common.annotation.ExperimentalApi; import org.opensearch.index.compositeindex.datacube.MetricStat; import org.opensearch.index.compositeindex.datacube.startree.aggregators.numerictype.StarTreeNumericType; import org.opensearch.index.fielddata.IndexNumericFieldData; diff --git a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/ValueAggregator.java b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/ValueAggregator.java index 3dd1f85845c17..0a8285678a36c 100644 --- a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/ValueAggregator.java +++ b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/ValueAggregator.java @@ -7,6 +7,7 @@ */ package org.opensearch.index.compositeindex.datacube.startree.aggregators; +import org.opensearch.common.annotation.ExperimentalApi; import org.opensearch.index.compositeindex.datacube.MetricStat; import org.opensearch.index.compositeindex.datacube.startree.aggregators.numerictype.StarTreeNumericType; diff --git a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/numerictype/StarTreeNumericType.java b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/numerictype/StarTreeNumericType.java index 8cfb6821289a4..b836e73d96f25 100644 --- a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/numerictype/StarTreeNumericType.java +++ b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/aggregators/numerictype/StarTreeNumericType.java @@ -8,6 +8,7 @@ package org.opensearch.index.compositeindex.datacube.startree.aggregators.numerictype; +import org.opensearch.common.annotation.ExperimentalApi; import org.opensearch.index.fielddata.IndexNumericFieldData; import java.util.function.Function; diff --git a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/utils/StarTreeBuilderUtils.java b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/utils/StarTreeBuilderUtils.java index cd360316c311a..d2a7c01a0bf21 100644 --- a/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/utils/StarTreeBuilderUtils.java +++ b/server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/utils/StarTreeBuilderUtils.java @@ -22,7 +22,6 @@ * Util class for building star tree * @opensearch.experimental */ -@ExperimentalApi public class StarTreeBuilderUtils { private StarTreeBuilderUtils() {} @@ -33,6 +32,7 @@ private StarTreeBuilderUtils() {} * Represents a node in a tree data structure, specifically designed for a star-tree implementation. * A star-tree node will represent both star and non-star nodes. */ + @ExperimentalApi public static class TreeNode { /** diff --git a/server/src/main/java/org/opensearch/index/mapper/MapperService.java b/server/src/main/java/org/opensearch/index/mapper/MapperService.java index ff1127d3b6f36..530a3092a5aa7 100644 --- a/server/src/main/java/org/opensearch/index/mapper/MapperService.java +++ b/server/src/main/java/org/opensearch/index/mapper/MapperService.java @@ -680,23 +680,6 @@ public ObjectMapper getObjectMapper(String name) { return this.mapper == null ? null : this.mapper.objectMappers().get(name); } - public boolean isCompositeIndexPresent() { - return this.mapper != null && !getCompositeFieldTypes().isEmpty(); - } - - public Set getCompositeFieldTypes() { - Set compositeMappedFieldTypes = new HashSet<>(); - if (this.mapper == null) { - return Collections.emptySet(); - } - for (MappedFieldType type : this.mapper.fieldTypes()) { - if (type instanceof CompositeMappedFieldType) { - compositeMappedFieldTypes.add((CompositeMappedFieldType) type); - } - } - return compositeMappedFieldTypes; - } - /** * Given a type (eg. long, string, ...), return an anonymous field mapper that can be used for search operations. */