Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Jul 31, 2024
1 parent c978ea3 commit 31e4964
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import org.opensearch.client.Client;
import org.opensearch.common.SetOnce;
import org.opensearch.common.io.stream.BytesStreamOutput;
import org.opensearch.common.xcontent.LoggingDeprecationHandler;
import org.opensearch.common.xcontent.support.XContentMapValues;
import org.opensearch.core.ParseField;
import org.opensearch.core.action.ActionListener;
Expand All @@ -56,8 +55,6 @@
import org.opensearch.index.IndexSettings;
import org.opensearch.index.mapper.ConstantFieldType;
import org.opensearch.index.mapper.MappedFieldType;
import org.opensearch.index.mapper.RewriteOverride;
import org.opensearch.index.query.support.QueryParsers;
import org.opensearch.indices.TermsLookup;

import java.io.IOException;
Expand Down Expand Up @@ -203,20 +200,16 @@ private TermsQueryBuilder(String fieldName, Supplier<List<?>> supplier) {
this.supplier = supplier;
}


private TermsQueryBuilder(String fieldName, Iterable<?> values, String rewrite_override) {
this(fieldName, values);
this.rewrite_override = rewrite_override;
}


private TermsQueryBuilder(String fieldName, Supplier<List<?>> supplier, String rewrite_override) {
this(fieldName, supplier);
this.rewrite_override = rewrite_override;
}



/**
* Read from a stream.
*/
Expand All @@ -226,7 +219,7 @@ public TermsQueryBuilder(StreamInput in) throws IOException {
termsLookup = in.readOptionalWriteable(TermsLookup::new);
values = (List<?>) in.readGenericValue();
this.supplier = null;
if (in.getVersion().after(Version.V_2_16_0)){
if (in.getVersion().after(Version.V_2_16_0)) {
rewrite_override = in.readOptionalString();
}
}
Expand All @@ -239,7 +232,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeString(fieldName);
out.writeOptionalWriteable(termsLookup);
out.writeGenericValue(values);
if (out.getVersion().after(Version.V_2_16_0)){
if (out.getVersion().after(Version.V_2_16_0)) {
out.writeOptionalString(rewrite_override);
}
}
Expand Down

0 comments on commit 31e4964

Please sign in to comment.