File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/search Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1818import org .elasticsearch .common .io .stream .StreamOutput ;
1919import org .elasticsearch .core .Nullable ;
2020import org .elasticsearch .index .mapper .MappedFieldType ;
21- import org .elasticsearch .index .mapper .Mapper ;
22- import org .elasticsearch .index .mapper .Mapping ;
23- import org .elasticsearch .index .mapper .RootObjectMapper ;
2421import org .elasticsearch .index .mapper .vectors .SparseVectorFieldMapper ;
2522import org .elasticsearch .index .mapper .vectors .TokenPruningConfig ;
2623import org .elasticsearch .index .query .AbstractQueryBuilder ;
@@ -240,8 +237,8 @@ protected Query doToQuery(SearchExecutionContext context) throws IOException {
240237
241238 // if the query options for pruning are not set, we need to check the index options for this field
242239 // and use those if set - however, only if the index was created after we added this support.
243- if (ft .getClass ().equals (SparseVectorFieldMapper .SparseVectorFieldType .class ) &&
244- context .indexVersionCreated ().onOrAfter (SparseVectorFieldMapper .SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION )) {
240+ if (ft .getClass ().equals (SparseVectorFieldMapper .SparseVectorFieldType .class )
241+ && context .indexVersionCreated ().onOrAfter (SparseVectorFieldMapper .SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION )) {
245242 SparseVectorFieldMapper .SparseVectorFieldType asSVFieldType = (SparseVectorFieldMapper .SparseVectorFieldType ) ft ;
246243
247244 if (asSVFieldType .getIndexOptions () != null ) {
You can’t perform that action at this time.
0 commit comments