Adding support for composite index#263
Merged
reta merged 5 commits intoopensearch-project:mainfrom Jul 11, 2025
Merged
Conversation
Signed-off-by: bharath-techie <bharath78910@gmail.com>
bharath-techie
commented
Jul 7, 2025
| Lucene101CustomStoredFieldsFormat storedFieldsFormat = (Lucene101CustomStoredFieldsFormat) codec.storedFieldsFormat(); | ||
| assertEquals(DEFAULT_COMPRESSION_LEVEL, storedFieldsFormat.getCompressionLevel()); | ||
| // assert docValues to be of compositeCodec's docValuesFormat | ||
| assert codec.docValuesFormat() instanceof Composite912DocValuesFormat; |
Contributor
Author
There was a problem hiding this comment.
Filter codec does not expose delegate, so could not find a better way for assertion.
Contributor
Author
|
Hi @reta @sarthakaggarwal97 @andrross @mgodwan , |
Signed-off-by: bharath-techie <bharath78910@gmail.com>
reta
requested changes
Jul 7, 2025
src/main/java/org/opensearch/index/codec/customcodecs/CustomCodecService.java
Outdated
Show resolved
Hide resolved
3 tasks
Signed-off-by: bharath-techie <bharath78910@gmail.com>
reta
reviewed
Jul 9, 2025
| int compressionLevel = indexSettings.getValue(INDEX_CODEC_COMPRESSION_LEVEL_SETTING); | ||
| final MapBuilder<String, Codec> codecs = MapBuilder.<String, Codec>newMapBuilder(); | ||
| // Delegate to OpenSearch "default" codec | ||
| Supplier<Codec> defaultCodecSupplier = () -> super.defaultCodec(); |
Collaborator
There was a problem hiding this comment.
I believe you don't need defaultCodecSupplier anymore, just use this::defaultCodec
Signed-off-by: bharath-techie <bharath78910@gmail.com>
Signed-off-by: Andriy Redko <drreta@gmail.com>
reta
approved these changes
Jul 11, 2025
3 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR adds support for composite indices with custom codecs.
We delegate to the
CompositeCodecinstead of always delegating to PerFieldMappingPostingFormatCodec based on whether mapper has Composite fields.Related Issues
Resolves #209
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.