mirror of https://github.com/apache/lucene.git
LUCENE-9322: Move Solr to Lucene90Codec.
And drop configurability of Lucene87Codec since it shouldn't be used for writing anymore.
This commit is contained in:
parent
849a28e539
commit
514c363f1d
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
package org.apache.lucene.backward_codecs.lucene87;
|
package org.apache.lucene.backward_codecs.lucene87;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import org.apache.lucene.codecs.Codec;
|
import org.apache.lucene.codecs.Codec;
|
||||||
import org.apache.lucene.codecs.CompoundFormat;
|
import org.apache.lucene.codecs.CompoundFormat;
|
||||||
import org.apache.lucene.codecs.DocValuesFormat;
|
import org.apache.lucene.codecs.DocValuesFormat;
|
||||||
|
@ -84,18 +82,8 @@ public class Lucene87Codec extends Codec {
|
||||||
* Instantiates a new codec.
|
* Instantiates a new codec.
|
||||||
*/
|
*/
|
||||||
public Lucene87Codec() {
|
public Lucene87Codec() {
|
||||||
this(Lucene87StoredFieldsFormat.Mode.BEST_SPEED);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiates a new codec, specifying the stored fields compression
|
|
||||||
* mode to use.
|
|
||||||
* @param mode stored fields compression mode to use for newly
|
|
||||||
* flushed/merged segments.
|
|
||||||
*/
|
|
||||||
public Lucene87Codec(Lucene87StoredFieldsFormat.Mode mode) {
|
|
||||||
super("Lucene87");
|
super("Lucene87");
|
||||||
this.storedFieldsFormat = new Lucene87StoredFieldsFormat(Objects.requireNonNull(mode));
|
this.storedFieldsFormat = new Lucene87StoredFieldsFormat();
|
||||||
this.defaultFormat = new Lucene84PostingsFormat();
|
this.defaultFormat = new Lucene84PostingsFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ import java.lang.invoke.MethodHandles;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.apache.lucene.backward_codecs.lucene87.Lucene87Codec;
|
|
||||||
import org.apache.lucene.codecs.Codec;
|
import org.apache.lucene.codecs.Codec;
|
||||||
import org.apache.lucene.codecs.DocValuesFormat;
|
import org.apache.lucene.codecs.DocValuesFormat;
|
||||||
import org.apache.lucene.codecs.PostingsFormat;
|
import org.apache.lucene.codecs.PostingsFormat;
|
||||||
import org.apache.lucene.codecs.lucene87.Lucene87StoredFieldsFormat.Mode;
|
import org.apache.lucene.codecs.lucene87.Lucene87StoredFieldsFormat.Mode;
|
||||||
|
import org.apache.lucene.codecs.lucene90.Lucene90Codec;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
import org.apache.solr.common.SolrException.ErrorCode;
|
import org.apache.solr.common.SolrException.ErrorCode;
|
||||||
import org.apache.solr.common.util.NamedList;
|
import org.apache.solr.common.util.NamedList;
|
||||||
|
@ -92,7 +92,7 @@ public class SchemaCodecFactory extends CodecFactory implements SolrCoreAware {
|
||||||
compressionMode = SOLR_DEFAULT_COMPRESSION_MODE;
|
compressionMode = SOLR_DEFAULT_COMPRESSION_MODE;
|
||||||
log.debug("Using default compressionMode: {}", compressionMode);
|
log.debug("Using default compressionMode: {}", compressionMode);
|
||||||
}
|
}
|
||||||
codec = new Lucene87Codec(compressionMode) {
|
codec = new Lucene90Codec(compressionMode) {
|
||||||
@Override
|
@Override
|
||||||
public PostingsFormat getPostingsFormatForField(String field) {
|
public PostingsFormat getPostingsFormatForField(String field) {
|
||||||
final SchemaField schemaField = core.getLatestSchema().getFieldOrNull(field);
|
final SchemaField schemaField = core.getLatestSchema().getFieldOrNull(field);
|
||||||
|
|
Loading…
Reference in New Issue