Fix mistake in TopHits change
This commit is contained in:
parent
d919031469
commit
b7afd80b3f
|
@ -538,7 +538,7 @@ public class TopHitsAggregatorBuilder extends AggregatorBuilder<TopHitsAggregato
|
||||||
factory.fieldNames = fieldNames;
|
factory.fieldNames = fieldNames;
|
||||||
}
|
}
|
||||||
factory.from = in.readVInt();
|
factory.from = in.readVInt();
|
||||||
in.readOptionalWriteable(HighlightBuilder::new);
|
factory.highlightBuilder = in.readOptionalWriteable(HighlightBuilder::new);
|
||||||
if (in.readBoolean()) {
|
if (in.readBoolean()) {
|
||||||
int size = in.readVInt();
|
int size = in.readVInt();
|
||||||
List<ScriptField> scriptFields = new ArrayList<>(size);
|
List<ScriptField> scriptFields = new ArrayList<>(size);
|
||||||
|
|
|
@ -249,9 +249,9 @@ public abstract class BaseAggregationTestCase<AB extends AggregatorBuilder<AB>>
|
||||||
try (StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(output.bytes()), namedWriteableRegistry)) {
|
try (StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(output.bytes()), namedWriteableRegistry)) {
|
||||||
AggregatorBuilder deserializedQuery = namedWriteableRegistry.getReader(AggregatorBuilder.class, testAgg.getWriteableName())
|
AggregatorBuilder deserializedQuery = namedWriteableRegistry.getReader(AggregatorBuilder.class, testAgg.getWriteableName())
|
||||||
.read(in);
|
.read(in);
|
||||||
assertEquals(deserializedQuery, testAgg);
|
assertEquals(testAgg, deserializedQuery);
|
||||||
assertEquals(deserializedQuery.hashCode(), testAgg.hashCode());
|
assertEquals(testAgg.hashCode(), deserializedQuery.hashCode());
|
||||||
assertNotSame(deserializedQuery, testAgg);
|
assertNotSame(testAgg, deserializedQuery);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue