-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
Signed-off-by: Andriy Redko <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
440301d62a8dcef9451cc0f94659fe95d360cfc7 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cb83d5c129acf83116c2fba1cbde5437c41de080 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
af087a850103b268c21f5a9187aab6522ab71969 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
33e1e2d0208ee500a473a40bec7870b9ecfbf2d7 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eb8499d06729c97cb8fa06138cdbc196003c4dce |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
190b139f55630a2e2c8f32827632bfa4710a4814 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
502562282159609956d03f276b8678330afbcb5b |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3c0f7c95dd74d7c696cfd25a7a4bab3a12e84ef1 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b82d2a8ca7b081f3771795255128c423f4444f31 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b1f118320c1f730e59b7e4ccf32a63fd6765edde |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
e30b13a395cc828ecfefd058c12b752726992c53 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
440301d62a8dcef9451cc0f94659fe95d360cfc7 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ab357668bd4cd5fb9b0b0d6b65e96f368e2a6302 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d1d080787d38bdd04c1e79d7d0bbebfe583140dc |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ce3e48336f80897c44c534904b588eb5e555a781 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
f57dcd318d7d278f11c23411aa2fb075b6cce470 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ed21cecc264f55d262279a5bce3aba5bca5a14cc |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
e6c6d94510adce557d66a16c24df354ae4f20624 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c5f8ac612d3a5d87df8b2281a592db75f21e772e |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ecea25f04b8ea21be6117beec0aa3c18fe015f6f |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d4d1424ddcbb65ae5d46925d7c242e3d25402144 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bc9bde807fe1665f08fdf455fa41dcef5f5ac3d4 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
76b7d3fd8301ca404d3a27517640b48b9ac852ea |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* 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.opensearch.index.codec.composite; | ||
|
||
import org.apache.logging.log4j.Logger; | ||
import org.apache.lucene.codecs.Codec; | ||
import org.apache.lucene.codecs.DocValuesFormat; | ||
import org.apache.lucene.codecs.FilterCodec; | ||
import org.apache.lucene.codecs.lucene912.Lucene912Codec; | ||
import org.opensearch.common.annotation.ExperimentalApi; | ||
import org.opensearch.index.codec.PerFieldMappingPostingFormatCodec; | ||
import org.opensearch.index.mapper.MapperService; | ||
|
||
/** | ||
* Extends the Codec to support new file formats for composite indices eg: star tree index | ||
* based on the mappings. | ||
* | ||
* @opensearch.experimental | ||
*/ | ||
@ExperimentalApi | ||
public class Composite912Codec extends FilterCodec { | ||
public static final String COMPOSITE_INDEX_CODEC_NAME = "Composite912Codec"; | ||
private final MapperService mapperService; | ||
|
||
// needed for SPI - this is used in reader path | ||
public Composite912Codec() { | ||
this(COMPOSITE_INDEX_CODEC_NAME, new Lucene912Codec(), null); | ||
} | ||
|
||
public Composite912Codec(Lucene912Codec.Mode compressionMode, MapperService mapperService, Logger logger) { | ||
this(COMPOSITE_INDEX_CODEC_NAME, new PerFieldMappingPostingFormatCodec(compressionMode, mapperService, logger), mapperService); | ||
} | ||
|
||
/** | ||
* Sole constructor. When subclassing this codec, create a no-arg ctor and pass the delegate codec and a unique name to | ||
* this ctor. | ||
* | ||
* @param name name of the codec | ||
* @param delegate codec delegate | ||
* @param mapperService mapper service instance | ||
*/ | ||
protected Composite912Codec(String name, Codec delegate, MapperService mapperService) { | ||
super(name, delegate); | ||
this.mapperService = mapperService; | ||
} | ||
|
||
@Override | ||
public DocValuesFormat docValuesFormat() { | ||
return new Composite99DocValuesFormat(mapperService); | ||
} | ||
} |