-
Notifications
You must be signed in to change notification settings - Fork 25
Adding support for composite index #263
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
Adding support for composite index #263
Conversation
Signed-off-by: bharath-techie <[email protected]>
| Lucene101CustomStoredFieldsFormat storedFieldsFormat = (Lucene101CustomStoredFieldsFormat) codec.storedFieldsFormat(); | ||
| assertEquals(DEFAULT_COMPRESSION_LEVEL, storedFieldsFormat.getCompressionLevel()); | ||
| // assert docValues to be of compositeCodec's docValuesFormat | ||
| assert codec.docValuesFormat() instanceof Composite912DocValuesFormat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter codec does not expose delegate, so could not find a better way for assertion.
|
Hi @reta @sarthakaggarwal97 @andrross @mgodwan , |
Signed-off-by: bharath-techie <[email protected]>
src/main/java/org/opensearch/index/codec/customcodecs/CustomCodecService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: bharath-techie <[email protected]>
| 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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you don't need defaultCodecSupplier anymore, just use this::defaultCodec
Signed-off-by: bharath-techie <[email protected]>
Signed-off-by: Andriy Redko <[email protected]>
sarthakaggarwal97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.