| 
40 | 40 | import org.elasticsearch.common.unit.Fuzziness;  | 
41 | 41 | import org.elasticsearch.core.Nullable;  | 
42 | 42 | import org.elasticsearch.index.IndexMode;  | 
 | 43 | +import org.elasticsearch.index.IndexSettings;  | 
43 | 44 | import org.elasticsearch.index.IndexSortConfig;  | 
44 | 45 | import org.elasticsearch.index.IndexVersion;  | 
45 | 46 | import org.elasticsearch.index.IndexVersions;  | 
 | 
83 | 84 | 
 
  | 
84 | 85 | import static org.apache.lucene.index.IndexWriter.MAX_TERM_LENGTH;  | 
85 | 86 | import static org.elasticsearch.core.Strings.format;  | 
86 |  | -import static org.elasticsearch.index.IndexSettings.DOC_VALUES_SPARSE_INDEX;  | 
87 | 87 | import static org.elasticsearch.index.IndexSettings.IGNORE_ABOVE_SETTING;  | 
88 | 88 | import static org.elasticsearch.index.IndexSettings.USE_DOC_VALUES_SPARSE_INDEX;  | 
89 | 89 | 
 
  | 
@@ -214,7 +214,7 @@ public Builder(final String name, final MappingParserContext mappingParserContex  | 
214 | 214 |                 mappingParserContext.getIndexSettings().getIndexVersionCreated(),  | 
215 | 215 |                 mappingParserContext.getIndexSettings().getMode(),  | 
216 | 216 |                 mappingParserContext.getIndexSettings().getIndexSortConfig(),  | 
217 |  | -                DOC_VALUES_SPARSE_INDEX.isEnabled() && USE_DOC_VALUES_SPARSE_INDEX.get(mappingParserContext.getSettings())  | 
 | 217 | +                USE_DOC_VALUES_SPARSE_INDEX.get(mappingParserContext.getSettings())  | 
218 | 218 |             );  | 
219 | 219 |         }  | 
220 | 220 | 
 
  | 
@@ -273,7 +273,7 @@ private Builder(  | 
273 | 273 |                 });  | 
274 | 274 |             this.indexSortConfig = indexSortConfig;  | 
275 | 275 |             this.indexMode = indexMode;  | 
276 |  | -            this.useDocValuesSparseIndex = useDocValuesSparseIndex;  | 
 | 276 | +            this.useDocValuesSparseIndex = IndexSettings.DOC_VALUES_SPARSE_INDEX.isEnabled() && useDocValuesSparseIndex;  | 
277 | 277 |         }  | 
278 | 278 | 
 
  | 
279 | 279 |         public Builder(String name, IndexVersion indexCreatedVersion) {  | 
 | 
0 commit comments