Skip to content

Commit cf7a302

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent e2e65db commit cf7a302

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,8 @@ public SparseVectorQueryBuilder(
125125
public SparseVectorQueryBuilder(StreamInput in) throws IOException {
126126
super(in);
127127
this.fieldName = in.readString();
128-
if (in.getTransportVersion().isPatchFrom(SPARSE_VECTOR_FIELD_PRUNING_OPTIONS_8_19) ||
129-
in.getTransportVersion().onOrAfter(TransportVersions.SPARSE_VECTOR_FIELD_PRUNING_OPTIONS)
130-
) {
128+
if (in.getTransportVersion().isPatchFrom(SPARSE_VECTOR_FIELD_PRUNING_OPTIONS_8_19)
129+
|| in.getTransportVersion().onOrAfter(TransportVersions.SPARSE_VECTOR_FIELD_PRUNING_OPTIONS)) {
131130
this.shouldPruneTokens = in.readOptionalBoolean();
132131
} else {
133132
this.shouldPruneTokens = in.readBoolean();
@@ -181,8 +180,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
181180

182181
out.writeString(fieldName);
183182
if (out.getTransportVersion().isPatchFrom(SPARSE_VECTOR_FIELD_PRUNING_OPTIONS_8_19)
184-
|| out.getTransportVersion().onOrAfter(TransportVersions.SPARSE_VECTOR_FIELD_PRUNING_OPTIONS)
185-
) {
183+
|| out.getTransportVersion().onOrAfter(TransportVersions.SPARSE_VECTOR_FIELD_PRUNING_OPTIONS)) {
186184
out.writeOptionalBoolean(shouldPruneTokens);
187185
} else {
188186
out.writeBoolean(shouldPruneTokens != null && shouldPruneTokens);

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/search/SparseVectorQueryBuilderTests.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,7 @@ protected Object simulateMethod(Method method, Object[] args) {
155155

156156
@Override
157157
protected void initializeAdditionalMappings(MapperService mapperService) throws IOException {
158-
mapperService.merge(
159-
"_doc",
160-
new CompressedXContent(getTestSparseVectorIndexMapping()),
161-
MapperService.MergeReason.MAPPING_UPDATE
162-
);
158+
mapperService.merge("_doc", new CompressedXContent(getTestSparseVectorIndexMapping()), MapperService.MergeReason.MAPPING_UPDATE);
163159
}
164160

165161
private String getTestSparseVectorIndexMapping() {

0 commit comments

Comments
 (0)