Remove unused field in CollapseBuilder

This commit is contained in:
Jim Ferenczi 2017-01-24 09:26:23 +01:00
parent 868b12b548
commit b0c2a5da30
1 changed files with 1 additions and 5 deletions

View File

@ -35,7 +35,6 @@ import org.elasticsearch.index.query.InnerHitBuilder;
import org.elasticsearch.index.query.QueryParseContext;
import org.elasticsearch.search.SearchContextException;
import org.elasticsearch.search.internal.SearchContext;
import org.elasticsearch.search.sort.SortMode;
import java.io.IOException;
import java.util.Objects;
@ -56,7 +55,6 @@ public class CollapseBuilder extends ToXContentToBytes implements Writeable {
}
private String field;
private SortMode multiValueMode;
private InnerHitBuilder innerHit;
private CollapseBuilder() {}
@ -72,14 +70,12 @@ public class CollapseBuilder extends ToXContentToBytes implements Writeable {
public CollapseBuilder(StreamInput in) throws IOException {
this.field = in.readString();
this.multiValueMode = in.readOptionalWriteable(SortMode::readFromStream);
this.innerHit = in.readOptionalWriteable(InnerHitBuilder::new);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(field);
out.writeOptionalWriteable(multiValueMode);
out.writeOptionalWriteable(innerHit);
}
@ -143,7 +139,7 @@ public class CollapseBuilder extends ToXContentToBytes implements Writeable {
@Override
public int hashCode() {
return Objects.hash(this.field, this.multiValueMode, this.innerHit);
return Objects.hash(this.field, this.innerHit);
}
public CollapseContext build(SearchContext context) {