Skip to content

Commit a104662

Browse files
committed
Fix completion postings format name
We moved to Completion101 with #116318, but that has been overwritten by
1 parent a707615 commit a104662

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/src/main/java/org/elasticsearch/index/codec/PerFieldFormatSupplier.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ private PostingsFormat internalGetPostingsFormatForField(String field) {
6060
if (mapperService != null) {
6161
Mapper mapper = mapperService.mappingLookup().getMapper(field);
6262
if (mapper instanceof CompletionFieldMapper) {
63-
return PostingsFormatHolder.POSTINGS_FORMAT;
63+
return CompletionPostingsFormatHolder.POSTINGS_FORMAT;
6464
}
6565
}
6666
// return our own posting format using PFOR
6767
return es812PostingsFormat;
6868
}
6969

70-
private static class PostingsFormatHolder {
71-
private static final PostingsFormat POSTINGS_FORMAT = getPostingsFormat();
70+
private static class CompletionPostingsFormatHolder {
71+
private static final PostingsFormat POSTINGS_FORMAT = getCompletionPostingsFormat();
7272

73-
private static PostingsFormat getPostingsFormat() {
74-
String defaultName = "Completion912"; // Caution: changing this name will result in exceptions if a field is created during a
73+
private static PostingsFormat getCompletionPostingsFormat() {
74+
String defaultName = "Completion101"; // Caution: changing this name will result in exceptions if a field is created during a
7575
// rolling upgrade and the new codec (specified by the name) is not available on all nodes in the cluster.
7676
String codecName = ExtensionLoader.loadSingleton(ServiceLoader.load(CompletionsPostingsFormatExtension.class))
7777
.map(CompletionsPostingsFormatExtension::getFormatName)

0 commit comments

Comments
 (0)