-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Complete keyword changes for star tree #16233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sachinpkale
merged 17 commits into
opensearch-project:main
from
bharath-techie:keyword-iterator
Nov 12, 2024
Merged
Changes from 4 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
bc6fe9b
star tree keyword changes
bharath-techie 3571ec8
Complete keyword changes
bharath-techie a48de57
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
bharath-techie 9238f17
adding tests and fixes
bharath-techie 537f19c
addressing comments
bharath-techie 914bdfd
fixing merge
bharath-techie ded4921
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
bharath-techie 5a5e8af
fixing tests
bharath-techie 5247065
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
bharath-techie fe8ed3e
resolving merge conflicts
bharath-techie d8d1e21
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
bharath-techie 63e90b0
addressing comments
bharath-techie 14f5011
addressing comments
bharath-techie 4bb632f
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
bharath-techie 6688d4b
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
bharath-techie 0af594b
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
bharath-techie 5c4a0e5
Merge branch 'main' into keyword-iterator
bharath-techie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
18 changes: 18 additions & 0 deletions
18
server/src/main/java/org/apache/lucene/index/DocValuesWriterWrapper.java
This file contains hidden or 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,18 @@ | ||
| /* | ||
| * 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.search.DocIdSetIterator; | ||
|
|
||
| /** | ||
| * Base wrapper class for DocValuesWriter. | ||
| */ | ||
| public abstract class DocValuesWriterWrapper<T extends DocIdSetIterator> { | ||
| public abstract T getDocValues(); | ||
| } | ||
This file contains hidden or 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
58 changes: 58 additions & 0 deletions
58
server/src/main/java/org/apache/lucene/index/SortedSetDocValuesWriterWrapper.java
This file contains hidden or 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,58 @@ | ||
| /* | ||
| * 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.util.ByteBlockPool; | ||
| import org.apache.lucene.util.BytesRef; | ||
| import org.apache.lucene.util.Counter; | ||
|
|
||
| /** | ||
| * A wrapper class for writing sorted set doc values. | ||
| * <p> | ||
| * This class provides a convenient way to add sorted set doc values to a field | ||
| * and retrieve the corresponding {@link SortedSetDocValues} instance. | ||
| * | ||
| * @opensearch.experimental | ||
| */ | ||
| public class SortedSetDocValuesWriterWrapper extends DocValuesWriterWrapper<SortedSetDocValues> { | ||
|
|
||
| private final SortedSetDocValuesWriter sortedSetDocValuesWriterWrapper; | ||
bharath-techie marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| /** | ||
| * Sole constructor. Constructs a new {@link SortedSetDocValuesWriterWrapper} instance. | ||
| * | ||
| * @param fieldInfo the field information for the field being written | ||
| * @param counter a counter for tracking memory usage | ||
| * @param byteBlockPool a byte block pool for allocating byte blocks | ||
| * @see SortedSetDocValuesWriter | ||
| */ | ||
| public SortedSetDocValuesWriterWrapper(FieldInfo fieldInfo, Counter counter, ByteBlockPool byteBlockPool) { | ||
| sortedSetDocValuesWriterWrapper = new SortedSetDocValuesWriter(fieldInfo, counter, byteBlockPool); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a bytes ref value to the sorted set doc values for the specified document. | ||
| * | ||
| * @param docID the document ID | ||
| * @param value the value to add | ||
| */ | ||
| public void addValue(int docID, BytesRef value) { | ||
bharath-techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| sortedSetDocValuesWriterWrapper.addValue(docID, value); | ||
| } | ||
|
|
||
| /** | ||
| * Returns the {@link SortedSetDocValues} instance containing the sorted numeric doc values | ||
| * | ||
| * @return the {@link SortedSetDocValues} instance | ||
| */ | ||
| @Override | ||
| public SortedSetDocValues getDocValues() { | ||
| return sortedSetDocValuesWriterWrapper.getDocValues(); | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.