-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle delete cases for star tree (#16380)
Signed-off-by: Bharathwaj G <bharath78910@gmail.com> (cherry picked from commit ad7f9e7) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
09f6490
commit ffb87a2
Showing
5 changed files
with
158 additions
and
23 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
server/src/main/java/org/apache/lucene/index/DocValuesProducerUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.apache.lucene.index; | ||
|
||
import org.apache.lucene.codecs.DocValuesProducer; | ||
|
||
import java.util.Collections; | ||
import java.util.Set; | ||
|
||
/** | ||
* Utility class for DocValuesProducers | ||
* @opensearch.internal | ||
*/ | ||
public class DocValuesProducerUtil { | ||
/** | ||
* Returns the segment doc values producers for the given doc values producer. | ||
* If the given doc values producer is not a segment doc values producer, an empty set is returned. | ||
* @param docValuesProducer the doc values producer | ||
* @return the segment doc values producers | ||
*/ | ||
public static Set<DocValuesProducer> getSegmentDocValuesProducers(DocValuesProducer docValuesProducer) { | ||
if (docValuesProducer instanceof SegmentDocValuesProducer) { | ||
return (((SegmentDocValuesProducer) docValuesProducer).dvProducers); | ||
} | ||
return Collections.emptySet(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters