Skip to content

Commit 08d51c9

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 4b46300 commit 08d51c9

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

server/src/main/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ public class SparseVectorFieldMapper extends FieldMapper {
7373

7474
static final IndexVersion NEW_SPARSE_VECTOR_INDEX_VERSION = IndexVersions.NEW_SPARSE_VECTOR;
7575
static final IndexVersion SPARSE_VECTOR_IN_FIELD_NAMES_INDEX_VERSION = IndexVersions.SPARSE_VECTOR_IN_FIELD_NAMES_SUPPORT;
76-
public static final IndexVersion SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION = IndexVersions.SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT;
76+
public static final IndexVersion SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION =
77+
IndexVersions.SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_SUPPORT;
7778

7879
private final SparseVectorFieldMapper.IndexOptions indexOptions;
7980

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/search/SparseVectorQueryBuilder.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,20 @@ protected Query doToQuery(SearchExecutionContext context) throws IOException {
241241
// was created after we added this support.
242242
if (context.indexVersionCreated().onOrAfter(SparseVectorFieldMapper.SPARSE_VECTOR_PRUNING_INDEX_OPTIONS_VERSION)) {
243243
SparseVectorFieldMapper sparseVectorFieldMapper = getSparseVectorFieldMapperForSearchExecution(fieldName, context);
244-
TokenPruningSet pruningOptions =
245-
setPruningConfigFromIndexIfNeeded(shouldPruneTokens, tokenPruningConfig, sparseVectorFieldMapper);
244+
TokenPruningSet pruningOptions = setPruningConfigFromIndexIfNeeded(
245+
shouldPruneTokens,
246+
tokenPruningConfig,
247+
sparseVectorFieldMapper
248+
);
246249

247250
return pruningOptions.pruneTokens
248-
? WeightedTokensUtils.queryBuilderWithPrunedTokens(fieldName, pruningOptions.pruningConfig, queryVectors, ft, context)
249-
: WeightedTokensUtils.queryBuilderWithAllTokens(fieldName, queryVectors, ft, context);
251+
? WeightedTokensUtils.queryBuilderWithPrunedTokens(fieldName, pruningOptions.pruningConfig, queryVectors, ft, context)
252+
: WeightedTokensUtils.queryBuilderWithAllTokens(fieldName, queryVectors, ft, context);
250253
}
251254

252255
return (shouldPruneTokens != null && shouldPruneTokens)
253-
? WeightedTokensUtils.queryBuilderWithPrunedTokens(fieldName, tokenPruningConfig, queryVectors, ft, context)
254-
: WeightedTokensUtils.queryBuilderWithAllTokens(fieldName, queryVectors, ft, context);
256+
? WeightedTokensUtils.queryBuilderWithPrunedTokens(fieldName, tokenPruningConfig, queryVectors, ft, context)
257+
: WeightedTokensUtils.queryBuilderWithAllTokens(fieldName, queryVectors, ft, context);
255258
}
256259

257260
@Override

0 commit comments

Comments
 (0)