Make SignificantTerms.Bucket an interface rather than an abstract class
Related to elastic/elasticsearch#24670 Original commit: elastic/x-pack-elasticsearch@e5b0123fbc
This commit is contained in:
parent
e36e2c604d
commit
ffcee524c5
|
@ -668,7 +668,7 @@ public class TransportGraphExploreAction extends HandledTransportAction<GraphExp
|
||||||
VertexRequest vr = rootHop.getVertexRequest(j);
|
VertexRequest vr = rootHop.getVertexRequest(j);
|
||||||
if (request.useSignificance()) {
|
if (request.useSignificance()) {
|
||||||
SignificantTerms significantTerms = sample.getAggregations().get("field" + j);
|
SignificantTerms significantTerms = sample.getAggregations().get("field" + j);
|
||||||
List<Bucket> buckets = significantTerms.getBuckets();
|
List<? extends Bucket> buckets = significantTerms.getBuckets();
|
||||||
for (Bucket bucket : buckets) {
|
for (Bucket bucket : buckets) {
|
||||||
double signalWeight = bucket.getSignificanceScore() / totalSignalStrength;
|
double signalWeight = bucket.getSignificanceScore() / totalSignalStrength;
|
||||||
addVertex(vr.fieldName(), bucket.getKeyAsString(), signalWeight,
|
addVertex(vr.fieldName(), bucket.getKeyAsString(), signalWeight,
|
||||||
|
@ -695,7 +695,7 @@ public class TransportGraphExploreAction extends HandledTransportAction<GraphExp
|
||||||
if (request.useSignificance()) {
|
if (request.useSignificance()) {
|
||||||
// Signal is based on significance score
|
// Signal is based on significance score
|
||||||
SignificantTerms significantTerms = sample.getAggregations().get("field" + i);
|
SignificantTerms significantTerms = sample.getAggregations().get("field" + i);
|
||||||
List<Bucket> buckets = significantTerms.getBuckets();
|
List<? extends Bucket> buckets = significantTerms.getBuckets();
|
||||||
for (Bucket bucket : buckets) {
|
for (Bucket bucket : buckets) {
|
||||||
totalSignalStrength += bucket.getSignificanceScore();
|
totalSignalStrength += bucket.getSignificanceScore();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue