Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.opensearch.common.annotation.ExperimentalApi;
import org.opensearch.index.codec.composite.backward_codecs.composite101.Composite101Codec;
import org.opensearch.index.codec.composite.composite103.Composite103Codec;
import org.opensearch.index.mapper.MapperService;

Expand All @@ -33,7 +32,7 @@
public class CompositeCodecFactory {

// we can use this to track the latest composite codec
public static final String COMPOSITE_CODEC = Composite101Codec.COMPOSITE_INDEX_CODEC_NAME;
public static final String COMPOSITE_CODEC = Composite103Codec.COMPOSITE_INDEX_CODEC_NAME;

public CompositeCodecFactory() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

package org.opensearch.index.codec.composite;

import org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
import org.apache.lucene.codecs.DocValuesConsumer;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.SegmentInfo;
import org.apache.lucene.index.SegmentWriteState;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.InfoStream;
import org.apache.lucene.util.Version;
import org.opensearch.index.codec.composite.backward_codecs.composite101.Composite101Codec;
import org.opensearch.index.codec.composite.composite103.Composite103Codec;
import org.opensearch.test.OpenSearchTestCase;
import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -49,7 +49,7 @@ public void testGetDocValuesConsumerForCompositeCodec() throws IOException {
randomInt(),
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
UUID.randomUUID().toString().substring(0, 16).getBytes(StandardCharsets.UTF_8),
new HashMap<>(),
Expand All @@ -73,7 +73,7 @@ public void testGetDocValuesConsumerForCompositeCodec() throws IOException {
);

assertEquals("org.apache.lucene.codecs.lucene90.Lucene90DocValuesConsumer", consumer.getClass().getName());
assertEquals(CompositeCodecFactory.COMPOSITE_CODEC, Composite101Codec.COMPOSITE_INDEX_CODEC_NAME);
assertEquals(CompositeCodecFactory.COMPOSITE_CODEC, Composite103Codec.COMPOSITE_INDEX_CODEC_NAME);
consumer.close();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

package org.opensearch.index.codec.composite;

import org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
import org.apache.lucene.codecs.DocValuesConsumer;
import org.apache.lucene.codecs.DocValuesProducer;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.SegmentInfo;
Expand Down Expand Up @@ -53,7 +53,7 @@ public void testGetDocValuesProducerForCompositeCodec99() throws IOException {
randomInt(),
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
UUID.randomUUID().toString().substring(0, 16).getBytes(StandardCharsets.UTF_8),
new HashMap<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

package org.opensearch.index.compositeindex.datacube.startree.builder;

import org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
import org.apache.lucene.codecs.DocValuesConsumer;
import org.apache.lucene.codecs.DocValuesProducer;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.apache.lucene.index.DocValuesSkipIndexType;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.FieldInfo;
Expand Down Expand Up @@ -115,7 +115,7 @@ public static void setup() throws IOException {
5,
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
UUID.randomUUID().toString().substring(0, 16).getBytes(StandardCharsets.UTF_8),
new HashMap<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

package org.opensearch.index.compositeindex.datacube.startree.builder;

import org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
import org.apache.lucene.codecs.DocValuesProducer;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.apache.lucene.index.DocValuesSkipIndexType;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.FieldInfo;
Expand Down Expand Up @@ -526,7 +526,7 @@ public static SegmentReadState getReadState(
numDocs,
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
writeState.segmentInfo.getId(),
new HashMap<>(),
Expand Down Expand Up @@ -580,7 +580,7 @@ public static SegmentWriteState getWriteState(int numDocs, byte[] id, FieldInfo[
numDocs,
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
id,
new HashMap<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

package org.opensearch.index.compositeindex.datacube.startree.builder;

import org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
import org.apache.lucene.codecs.DocValuesConsumer;
import org.apache.lucene.codecs.DocValuesProducer;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.apache.lucene.index.DocValuesSkipIndexType;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.FieldInfo;
Expand Down Expand Up @@ -641,7 +641,7 @@ public void test_build_multipleStarTrees() throws IOException {
7,
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
UUID.randomUUID().toString().substring(0, 16).getBytes(StandardCharsets.UTF_8),
new HashMap<>(),
Expand Down Expand Up @@ -925,7 +925,7 @@ public void test_build_starTreeDataset() throws IOException {
7,
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
UUID.randomUUID().toString().substring(0, 16).getBytes(StandardCharsets.UTF_8),
new HashMap<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

package org.opensearch.index.compositeindex.datacube.startree.builder;

import org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
import org.apache.lucene.codecs.DocValuesConsumer;
import org.apache.lucene.codecs.DocValuesProducer;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.SegmentInfo;
Expand Down Expand Up @@ -65,7 +65,7 @@ public void setUp() throws Exception {
5,
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
UUID.randomUUID().toString().substring(0, 16).getBytes(StandardCharsets.UTF_8),
new HashMap<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

package org.opensearch.index.compositeindex.datacube.startree.fileformats.meta;

import org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.apache.lucene.index.DocValuesSkipIndexType;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.FieldInfo;
Expand Down Expand Up @@ -81,7 +81,7 @@ public void setup() throws IOException {
6,
false,
false,
new Lucene101Codec(),
new Lucene103Codec(),
new HashMap<>(),
UUID.randomUUID().toString().substring(0, 16).getBytes(StandardCharsets.UTF_8),
new HashMap<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

package org.opensearch.index.engine;

import org.apache.lucene.backward_codecs.lucene101.Lucene101Codec;
import org.apache.lucene.codecs.PostingsFormat;
import org.apache.lucene.codecs.lucene103.Lucene103Codec;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexWriter;
Expand Down Expand Up @@ -70,7 +70,7 @@ public void testExceptionsAreNotCached() {
public void testCompletionStatsCache() throws IOException, InterruptedException {
final IndexWriterConfig indexWriterConfig = newIndexWriterConfig();
final PostingsFormat postingsFormat = new Completion101PostingsFormat();
indexWriterConfig.setCodec(new Lucene101Codec() {
indexWriterConfig.setCodec(new Lucene103Codec() {
@Override
public PostingsFormat getPostingsFormatForField(String field) {
return postingsFormat; // all fields are suggest fields
Expand Down
Loading