mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-01 16:39:11 +00:00
Fix constant to not use the default codec name since it can change in tests
This commit is contained in:
parent
610ce078fb
commit
687705364d
@ -61,7 +61,7 @@ public class Lucene {
|
|||||||
public static final Version QUERYPARSER_VERSION = VERSION;
|
public static final Version QUERYPARSER_VERSION = VERSION;
|
||||||
public static final String LATEST_DOC_VALUES_FORMAT = "Lucene50";
|
public static final String LATEST_DOC_VALUES_FORMAT = "Lucene50";
|
||||||
public static final String LATEST_POSTINGS_FORMAT = "Lucene50";
|
public static final String LATEST_POSTINGS_FORMAT = "Lucene50";
|
||||||
public static final String LATEST_CODEC = Codec.getDefault().getName();
|
public static final String LATEST_CODEC = "Lucene50";
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Deprecated annotation = PostingsFormat.forName(LATEST_POSTINGS_FORMAT).getClass().getAnnotation(Deprecated.class);
|
Deprecated annotation = PostingsFormat.forName(LATEST_POSTINGS_FORMAT).getClass().getAnnotation(Deprecated.class);
|
||||||
|
@ -46,7 +46,7 @@ public class PerFieldMappingPostingFormatCodec extends Lucene50Codec {
|
|||||||
private final DocValuesFormat defaultDocValuesFormat;
|
private final DocValuesFormat defaultDocValuesFormat;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
assert Codec.forName(Lucene.LATEST_CODEC).getClass().isAssignableFrom(PerFieldMappingPostingFormatCodec.class) : "PerFieldMappingPostingFormatCodec must subclass default codec";
|
assert Codec.forName(Lucene.LATEST_CODEC).getClass().isAssignableFrom(PerFieldMappingPostingFormatCodec.class) : "PerFieldMappingPostingFormatCodec must subclass the latest lucene codec: " + Lucene.LATEST_CODEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PerFieldMappingPostingFormatCodec(MapperService mapperService, PostingsFormat defaultPostingFormat, DocValuesFormat defaultDocValuesFormat, ESLogger logger) {
|
public PerFieldMappingPostingFormatCodec(MapperService mapperService, PostingsFormat defaultPostingFormat, DocValuesFormat defaultDocValuesFormat, ESLogger logger) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user