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 String LATEST_DOC_VALUES_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 {
|
||||
Deprecated annotation = PostingsFormat.forName(LATEST_POSTINGS_FORMAT).getClass().getAnnotation(Deprecated.class);
|
||||
|
|
|
@ -46,7 +46,7 @@ public class PerFieldMappingPostingFormatCodec extends Lucene50Codec {
|
|||
private final DocValuesFormat defaultDocValuesFormat;
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue