Skip to content

Commit c696370

Browse files
bharath-techiebowenlan-amznprudhvigodithisgup432Sagar Upadhyaya
committed
Startree file formats codec merge (#29)
* Fix flaky test in range aggregation yaml test (opensearch-project#14486) Signed-off-by: bowenlan-amzn <[email protected]> * Use CODECOV_TOKEN (opensearch-project#14536) Signed-off-by: Prudhvi Godithi <[email protected]> * [Tiered Caching] Moving query recomputation logic outside of write lock (opensearch-project#14187) * Moving query recompute out of write lock Signed-off-by: Sagar Upadhyaya <[email protected]> * [Tiered Caching] Moving query recomputation logic outside of write lock Signed-off-by: Sagar Upadhyaya <[email protected]> * Adding java doc for the completable map Signed-off-by: Sagar Upadhyaya <[email protected]> * Changes to call future handler only once per key Signed-off-by: Sagar Upadhyaya <[email protected]> * Fixing spotless check Signed-off-by: Sagar Upadhyaya <[email protected]> * Added changelog Signed-off-by: Sagar Upadhyaya <[email protected]> * Addressing comments Signed-off-by: Sagar Upadhyaya <[email protected]> * Fixing gradle fail Signed-off-by: Sagar Upadhyaya <[email protected]> * Addressing comments to refactor unit test Signed-off-by: Sagar Upadhyaya <[email protected]> * minor UT refactor Signed-off-by: Sagar Upadhyaya <[email protected]> --------- Signed-off-by: Sagar Upadhyaya <[email protected]> Signed-off-by: Sagar <[email protected]> Co-authored-by: Sagar Upadhyaya <[email protected]> * Fix Flaky Test ClusterRerouteIT.testDelayWithALargeAmountOfShards (opensearch-project#14510) Signed-off-by: kkewwei [email protected] Signed-off-by: kkewwei [email protected] Signed-off-by: kkewwei <[email protected]> * Add doc for debugging rest tests (opensearch-project#14491) * add doc for debugging rest tests Signed-off-by: bowenlan-amzn <[email protected]> * Update TESTING.md Co-authored-by: Marc Handalian <[email protected]> Signed-off-by: bowenlan-amzn <[email protected]> * Address comment Signed-off-by: bowenlan-amzn <[email protected]> --------- Signed-off-by: bowenlan-amzn <[email protected]> Co-authored-by: Marc Handalian <[email protected]> * Fix flaky DefaultCacheStatsHolderTests (opensearch-project#14462) Signed-off-by: Peter Alfonsi <[email protected]> Co-authored-by: Peter Alfonsi <[email protected]> * [AUTO] [main] Add bwc version 2.15.1. (opensearch-project#14549) * Add bwc version 2.15.1 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix auto-generated version Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: opensearch-ci-bot <[email protected]> Co-authored-by: Andrew Ross <[email protected]> * Fix flaky test TieredSpilloverCacheTests.testComputeIfAbsentConcurrently (opensearch-project#14550) * Fix flaky test TieredSpilloverCacheTests.testComputeIfAbsentConcurrently Signed-off-by: Sagar Upadhyaya <[email protected]> * Addressing comment Signed-off-by: Sagar Upadhyaya <[email protected]> --------- Signed-off-by: Sagar Upadhyaya <[email protected]> Signed-off-by: Sagar Upadhyaya <[email protected]> Co-authored-by: Sagar Upadhyaya <[email protected]> * Add allowlist setting for ingest-common processors (opensearch-project#14479) Add a new static setting that lets an operator choose specific ingest processors to enable by name. The behavior is as follows: - If the allowlist setting is not defined, all installed processors are enabled. This is the status quo. - If the allowlist setting is defined as the empty set, then all processors are disabled. - If the allowlist setting contains the names of valid processors, only those processors are enabled. - If the allowlist setting contains a name of a processor that does not exist, then the server will fail to start with an IllegalStateException listing which processors were defined in the allowlist but are not installed. - If the allowlist setting is changed between server restarts then any ingest pipeline using a now-disabled processor will fail. This is the same experience if a pipeline used a processor defined by a plugin but then that plugin were to be uninstalled across restarts. Related to opensearch-project#14439 Signed-off-by: Andrew Ross <[email protected]> * Fix file cache initialization (opensearch-project#14004) * fix file cache initialization Signed-off-by: panguixin <[email protected]> * changelog Signed-off-by: panguixin <[email protected]> * add test Signed-off-by: panguixin <[email protected]> --------- Signed-off-by: panguixin <[email protected]> * Add Ashish Singh as maintainer (opensearch-project#14567) Signed-off-by: Bukhtawar Khan <[email protected]> * Allow @internalapi annotation on classes not meant to be constructed outside of the OpenSearch core (opensearch-project#14575) Signed-off-by: Andriy Redko <[email protected]> * Bump com.azure:azure-storage-common from 12.21.2 to 12.25.1 in /plugins/repository-azure (opensearch-project#14517) * Bump com.azure:azure-storage-common in /plugins/repository-azure Bumps [com.azure:azure-storage-common](https://github.com/Azure/azure-sdk-for-java) from 12.21.2 to 12.25.1. - [Release notes](https://github.com/Azure/azure-sdk-for-java/releases) - [Commits](Azure/azure-sdk-for-java@azure-storage-common_12.21.2...azure-storage-blob_12.25.1) --- updated-dependencies: - dependency-name: com.azure:azure-storage-common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Updating SHAs Signed-off-by: dependabot[bot] <[email protected]> * Update changelog Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Andriy Redko <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Andriy Redko <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com> * Add allowlist setting for search-pipeline-common processors (opensearch-project#14562) Add a new static setting that lets an operator choose specific search pipeline processors to enable by name. The behavior is as follows: - If the allowlist setting is not defined, all installed processors are enabled. This is the status quo. - If the allowlist setting is defined as the empty set, then all processors are disabled. - If the allowlist setting contains the names of valid processors, only those processors are enabled. - If the allowlist setting contains a name of a processor that does not exist, then the server will fail to start with an IllegalStateException listing which processors were defined in the allowlist but are not installed. - If the allowlist setting is changed between server restarts then any ingest pipeline using a now-disabled processor will fail. This is the same experience if a pipeline used a processor defined by a plugin but then that plugin were to be uninstalled across restarts. A distinct setting exists for each of request, response, and search phase results processors. Related to opensearch-project#14439 Signed-off-by: Andrew Ross <[email protected]> * Bump Apache Lucene to 9.11.1 (opensearch-project#14576) (opensearch-project#14581) (cherry picked from commit 0095fd1) Signed-off-by: Andriy Redko <[email protected]> * Add unittests for RemoteClusterStateAttributesManager (opensearch-project#14427) * Add unittests for RemoteClusterStateAttributesManager Signed-off-by: Shivansh Arora <[email protected]> * Add Ashish Singh to codeowners (opensearch-project#14592) Signed-off-by: Ashish Singh <[email protected]> * Add batching processor base type AbstractBatchingProcessor (opensearch-project#14554) Signed-off-by: Liyun Xiu <[email protected]> * Add @internalapi annotation to japicmp exclusions (opensearch-project#14597) Signed-off-by: Andriy Redko <[email protected]> * Fix issue 14519:Parsing a GetResult returns NPE if found field is mis… (opensearch-project#14552) * Fix issue 14519:Parsing a GetResult returns NPE if found field is missing. Signed-off-by: Vatsal <[email protected]> Signed-off-by: vatsal <[email protected]> * Fix issue 14519:Parsing a GetResult returns NPE if found field is missing. Signed-off-by: Vatsal <[email protected]> Signed-off-by: vatsal <[email protected]> * Fix issue 14519:Fix wildcart import. Signed-off-by: Vatsal <[email protected]> Signed-off-by: vatsal <[email protected]> * Fix issue 14519:Fix wildcart import. Signed-off-by: Vatsal <[email protected]> Signed-off-by: vatsal <[email protected]> * Fix issue 14519:Fix spotless issues. Signed-off-by: Vatsal <[email protected]> Signed-off-by: vatsal <[email protected]> * Fix issue 14519:update changelog Signed-off-by: vatsal <[email protected]> --------- Signed-off-by: vatsal <[email protected]> Signed-off-by: Daniel Widdis <[email protected]> Co-authored-by: Daniel Widdis <[email protected]> * Star tree mapping changes (opensearch-project#14605) * Star tree mapping changes with feature flag --------- Signed-off-by: Bharathwaj G <[email protected]> * Bump com.microsoft.azure:msal4j from 1.15.1 to 1.16.0 in /plugins/repository-azure (opensearch-project#14610) * Bump com.microsoft.azure:msal4j in /plugins/repository-azure Bumps [com.microsoft.azure:msal4j](https://github.com/AzureAD/microsoft-authentication-library-for-java) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/AzureAD/microsoft-authentication-library-for-java/releases) - [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-java/blob/dev/changelog.txt) - [Commits](AzureAD/microsoft-authentication-library-for-java@v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: com.microsoft.azure:msal4j dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Updating SHAs Signed-off-by: dependabot[bot] <[email protected]> * Update changelog Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com> * [Bugfix] Fix ICacheKeySerializerTests flakiness (opensearch-project#14564) * Fix testInvalidInput flakiness Signed-off-by: Peter Alfonsi <[email protected]> * Addressed andrross's comment Signed-off-by: Peter Alfonsi <[email protected]> * rerun security check Signed-off-by: Peter Alfonsi <[email protected]> --------- Signed-off-by: Peter Alfonsi <[email protected]> Co-authored-by: Peter Alfonsi <[email protected]> * Correct typo in method name (opensearch-project#14621) Signed-off-by: vatsal <[email protected]> * Refactoring FilterPath.parse by using an iterative approach instead of recursion. (opensearch-project#14200) * Refactor FilterPath parse function (opensearch-project#12067) Signed-off-by: Robin Friedmann <[email protected]> * Implement unit tests for FilterPathTests (opensearch-project#12067) Signed-off-by: Robin Friedmann <[email protected]> * Write warn log if Filter is empty; Add comments (opensearch-project#12067) Signed-off-by: Robin Friedmann <[email protected]> * Add changelog Signed-off-by: Siddhant Deshmukh <[email protected]> * Remove unnecessary log statement Signed-off-by: Siddhant Deshmukh <[email protected]> * Remove unused logger Signed-off-by: Siddhant Deshmukh <[email protected]> * Spotless apply Signed-off-by: Siddhant Deshmukh <[email protected]> * Remove incorrect changelog Signed-off-by: Siddhant Deshmukh <[email protected]> --------- Signed-off-by: Siddhant Deshmukh <[email protected]> Co-authored-by: Robin Friedmann <[email protected]> * Removing String format in RemoteStoreMigrationAllocationDecider to optimise performance(opensearch-project#14612) Signed-off-by: RS146BIJAY <[email protected]> * Clear templates before Adding; Use NamedWriteableAwareStreamInput for RemoteCustomMetadata; Correct the check for deciding upload of HashesOfConsistentSettings (opensearch-project#14513) * Clear templates before Adding; Use NamedWriteableAwareStreamInput for RemoteCustomMetadata * Correct the check for deciding upload of hashes of consistent settings Signed-off-by: Sooraj Sinha <[email protected]> * Improve reroute performance by optimising List.removeAll in LocalShardsBalancer to filter remote search shard from relocation decision (opensearch-project#14613) Signed-off-by: RS146BIJAY <[email protected]> * Fix assertion failure while deleting remote backed index (opensearch-project#14601) Signed-off-by: Sachin Kale <[email protected]> * OnHeap Star Tree Implementation Signed-off-by: Sarthak Aggarwal <[email protected]> * addressed nits Signed-off-by: Sarthak Aggarwal <[email protected]> * addressed major nits Signed-off-by: Sarthak Aggarwal <[email protected]> * includes Count Aggregator Signed-off-by: Sarthak Aggarwal <[email protected]> * handling for missing doc values Signed-off-by: Sarthak Aggarwal <[email protected]> * addressing review comments Signed-off-by: Sarthak Aggarwal <[email protected]> * rebasing with main Signed-off-by: Sarthak Aggarwal <[email protected]> * support for empty sequential doc values iterator Signed-off-by: Sarthak Aggarwal <[email protected]> * nits Signed-off-by: Sarthak Aggarwal <[email protected]> * min and max star tree aggregators Signed-off-by: Sarthak Aggarwal <[email protected]> * star tree file formats * Star tree codec changes Signed-off-by: Bharathwaj G <[email protected]> * Adding tests Signed-off-by: Bharathwaj G <[email protected]> * Addressing comments Signed-off-by: Bharathwaj G <[email protected]> * addressing review comments Signed-off-by: Bharathwaj G <[email protected]> * Star tree merge changes Signed-off-by: Bharathwaj G <[email protected]> * fix annotations * star-tree file formats reader and javadoc fixes * read for composite index values Signed-off-by: Sarthak Aggarwal <[email protected]> * doc values file format Signed-off-by: Sarthak Aggarwal <[email protected]> --------- Signed-off-by: bowenlan-amzn <[email protected]> Signed-off-by: Prudhvi Godithi <[email protected]> Signed-off-by: Sagar Upadhyaya <[email protected]> Signed-off-by: Sagar <[email protected]> Signed-off-by: kkewwei [email protected] Signed-off-by: kkewwei <[email protected]> Signed-off-by: Peter Alfonsi <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Andrew Ross <[email protected]> Signed-off-by: Sagar Upadhyaya <[email protected]> Signed-off-by: panguixin <[email protected]> Signed-off-by: Bukhtawar Khan <[email protected]> Signed-off-by: Andriy Redko <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Shivansh Arora <[email protected]> Signed-off-by: Ashish Singh <[email protected]> Signed-off-by: Liyun Xiu <[email protected]> Signed-off-by: vatsal <[email protected]> Signed-off-by: Daniel Widdis <[email protected]> Signed-off-by: Siddhant Deshmukh <[email protected]> Signed-off-by: RS146BIJAY <[email protected]> Signed-off-by: Sooraj Sinha <[email protected]> Signed-off-by: Sachin Kale <[email protected]> Signed-off-by: Sarthak Aggarwal <[email protected]> Signed-off-by: Bharathwaj G <[email protected]> Co-authored-by: bowenlan-amzn <[email protected]> Co-authored-by: Prudhvi Godithi <[email protected]> Co-authored-by: Sagar <[email protected]> Co-authored-by: Sagar Upadhyaya <[email protected]> Co-authored-by: kkewwei <[email protected]> Co-authored-by: Marc Handalian <[email protected]> Co-authored-by: Peter Alfonsi <[email protected]> Co-authored-by: Peter Alfonsi <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: opensearch-ci-bot <[email protected]> Co-authored-by: Andrew Ross <[email protected]> Co-authored-by: panguixin <[email protected]> Co-authored-by: Bukhtawar Khan <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com> Co-authored-by: Shivansh Arora <[email protected]> Co-authored-by: Ashish Singh <[email protected]> Co-authored-by: Liyun Xiu <[email protected]> Co-authored-by: Vatsal <[email protected]> Co-authored-by: Daniel Widdis <[email protected]> Co-authored-by: Siddhant Deshmukh <[email protected]> Co-authored-by: Robin Friedmann <[email protected]> Co-authored-by: rishavz_sagar <[email protected]> Co-authored-by: Sooraj Sinha <[email protected]> Co-authored-by: Sachin Kale <[email protected]> Co-authored-by: Sarthak Aggarwal <[email protected]>
1 parent 2d8c68c commit c696370

File tree

59 files changed

+6293
-1242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+6293
-1242
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
package org.apache.lucene.codecs.lucene90;
10+
11+
import org.apache.lucene.codecs.DocValuesConsumer;
12+
import org.apache.lucene.codecs.DocValuesProducer;
13+
import org.apache.lucene.index.FieldInfo;
14+
import org.apache.lucene.index.SegmentWriteState;
15+
16+
import java.io.IOException;
17+
18+
/**
19+
* This class is an abstraction of the {@link DocValuesConsumer} for the Star Tree index structure.
20+
* It is responsible to consume various types of document values (numeric, binary, sorted, sorted numeric,
21+
* and sorted set) for fields in the Star Tree index.
22+
*
23+
* @opensearch.experimental
24+
*/
25+
public class Composite99DocValuesConsumer extends DocValuesConsumer {
26+
27+
Lucene90DocValuesConsumer lucene90DocValuesConsumer;
28+
29+
public Composite99DocValuesConsumer(
30+
SegmentWriteState state,
31+
String dataCodec,
32+
String dataExtension,
33+
String metaCodec,
34+
String metaExtension
35+
) throws IOException {
36+
lucene90DocValuesConsumer = new Lucene90DocValuesConsumer(state, dataCodec, dataExtension, metaCodec, metaExtension);
37+
}
38+
39+
@Override
40+
public void close() throws IOException {
41+
this.lucene90DocValuesConsumer.close();
42+
}
43+
44+
@Override
45+
public void addNumericField(FieldInfo fieldInfo, DocValuesProducer docValuesProducer) throws IOException {
46+
lucene90DocValuesConsumer.addNumericField(fieldInfo, docValuesProducer);
47+
}
48+
49+
@Override
50+
public void addBinaryField(FieldInfo fieldInfo, DocValuesProducer docValuesProducer) throws IOException {
51+
lucene90DocValuesConsumer.addNumericField(fieldInfo, docValuesProducer);
52+
}
53+
54+
@Override
55+
public void addSortedField(FieldInfo fieldInfo, DocValuesProducer docValuesProducer) throws IOException {
56+
lucene90DocValuesConsumer.addSortedField(fieldInfo, docValuesProducer);
57+
}
58+
59+
@Override
60+
public void addSortedNumericField(FieldInfo fieldInfo, DocValuesProducer docValuesProducer) throws IOException {
61+
lucene90DocValuesConsumer.addSortedNumericField(fieldInfo, docValuesProducer);
62+
}
63+
64+
@Override
65+
public void addSortedSetField(FieldInfo fieldInfo, DocValuesProducer docValuesProducer) throws IOException {
66+
lucene90DocValuesConsumer.addSortedSetField(fieldInfo, docValuesProducer);
67+
}
68+
}
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
package org.apache.lucene.codecs.lucene90;
10+
11+
import org.apache.lucene.codecs.DocValuesProducer;
12+
import org.apache.lucene.index.BinaryDocValues;
13+
import org.apache.lucene.index.DocValuesType;
14+
import org.apache.lucene.index.FieldInfo;
15+
import org.apache.lucene.index.FieldInfos;
16+
import org.apache.lucene.index.IndexOptions;
17+
import org.apache.lucene.index.NumericDocValues;
18+
import org.apache.lucene.index.SegmentReadState;
19+
import org.apache.lucene.index.SortedDocValues;
20+
import org.apache.lucene.index.SortedNumericDocValues;
21+
import org.apache.lucene.index.SortedSetDocValues;
22+
import org.apache.lucene.index.VectorEncoding;
23+
import org.apache.lucene.index.VectorSimilarityFunction;
24+
import org.opensearch.index.compositeindex.datacube.startree.aggregators.MetricEntry;
25+
26+
import java.io.IOException;
27+
import java.util.Collections;
28+
import java.util.List;
29+
30+
import static org.opensearch.index.compositeindex.datacube.startree.utils.StarTreeHelper.fullFieldNameForStarTreeDimensionsDocValues;
31+
import static org.opensearch.index.compositeindex.datacube.startree.utils.StarTreeHelper.fullFieldNameForStarTreeMetricsDocValues;
32+
33+
/**
34+
* This class is a custom abstraction of the {@link DocValuesProducer} for the Star Tree index structure.
35+
* It is responsible for providing access to various types of document values (numeric, binary, sorted, sorted numeric,
36+
* and sorted set) for fields in the Star Tree index.
37+
*
38+
* @opensearch.experimental
39+
*/
40+
public class StarTree99DocValuesProducer extends DocValuesProducer {
41+
42+
Lucene90DocValuesProducer lucene90DocValuesProducer;
43+
private final List<FieldInfo> dimensions;
44+
private final List<MetricEntry> metrics;
45+
private final FieldInfos fieldInfos;
46+
47+
public StarTree99DocValuesProducer(
48+
SegmentReadState state,
49+
String dataCodec,
50+
String dataExtension,
51+
String metaCodec,
52+
String metaExtension,
53+
List<FieldInfo> dimensions,
54+
List<MetricEntry> metricEntries,
55+
String compositeFieldName
56+
) throws IOException {
57+
this.dimensions = dimensions;
58+
this.metrics = metricEntries;
59+
60+
// populates the dummy list of field infos to fetch doc id set iterators for respective fields.
61+
this.fieldInfos = new FieldInfos(getFieldInfoList(compositeFieldName));
62+
SegmentReadState segmentReadState = new SegmentReadState(state.directory, state.segmentInfo, fieldInfos, state.context);
63+
lucene90DocValuesProducer = new Lucene90DocValuesProducer(segmentReadState, dataCodec, dataExtension, metaCodec, metaExtension);
64+
}
65+
66+
@Override
67+
public NumericDocValues getNumeric(FieldInfo field) throws IOException {
68+
return this.lucene90DocValuesProducer.getNumeric(field);
69+
}
70+
71+
@Override
72+
public BinaryDocValues getBinary(FieldInfo field) throws IOException {
73+
return this.lucene90DocValuesProducer.getBinary(field);
74+
}
75+
76+
@Override
77+
public SortedDocValues getSorted(FieldInfo field) throws IOException {
78+
return this.lucene90DocValuesProducer.getSorted(field);
79+
}
80+
81+
@Override
82+
public SortedNumericDocValues getSortedNumeric(FieldInfo field) throws IOException {
83+
return this.lucene90DocValuesProducer.getSortedNumeric(field);
84+
}
85+
86+
@Override
87+
public SortedSetDocValues getSortedSet(FieldInfo field) throws IOException {
88+
return this.lucene90DocValuesProducer.getSortedSet(field);
89+
}
90+
91+
@Override
92+
public void checkIntegrity() throws IOException {
93+
this.lucene90DocValuesProducer.checkIntegrity();
94+
}
95+
96+
// returns the doc id set iterator based on field name
97+
public SortedNumericDocValues getSortedNumeric(String fieldName) throws IOException {
98+
return this.lucene90DocValuesProducer.getSortedNumeric(fieldInfos.fieldInfo(fieldName));
99+
}
100+
101+
@Override
102+
public void close() throws IOException {
103+
this.lucene90DocValuesProducer.close();
104+
}
105+
106+
private FieldInfo[] getFieldInfoList(String compositeFieldName) {
107+
FieldInfo[] fieldInfoList = new FieldInfo[this.dimensions.size() + metrics.size()];
108+
// field number is not really used. We depend on unique field names to get the desired iterator
109+
int fieldNumber = 0;
110+
111+
for (FieldInfo dimension : this.dimensions) {
112+
fieldInfoList[fieldNumber] = new FieldInfo(
113+
fullFieldNameForStarTreeDimensionsDocValues(compositeFieldName, dimension.getName()),
114+
fieldNumber,
115+
false,
116+
false,
117+
true,
118+
IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS,
119+
DocValuesType.SORTED_NUMERIC,
120+
-1,
121+
Collections.emptyMap(),
122+
0,
123+
0,
124+
0,
125+
0,
126+
VectorEncoding.FLOAT32,
127+
VectorSimilarityFunction.EUCLIDEAN,
128+
false,
129+
false
130+
);
131+
fieldNumber++;
132+
}
133+
for (MetricEntry metric : metrics) {
134+
fieldInfoList[fieldNumber] = new FieldInfo(
135+
fullFieldNameForStarTreeMetricsDocValues(compositeFieldName, metric.getMetricName(), metric.getMetricStat().getTypeName()),
136+
fieldNumber,
137+
false,
138+
false,
139+
true,
140+
IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS,
141+
DocValuesType.SORTED_NUMERIC,
142+
-1,
143+
Collections.emptyMap(),
144+
0,
145+
0,
146+
0,
147+
0,
148+
VectorEncoding.FLOAT32,
149+
VectorSimilarityFunction.EUCLIDEAN,
150+
false,
151+
false
152+
);
153+
fieldNumber++;
154+
}
155+
return fieldInfoList;
156+
}
157+
158+
}

0 commit comments

Comments
 (0)