Fix result mappings

Original commit: elastic/x-pack-elasticsearch@e63209af98
This commit is contained in:
Dimitrios Athanasiou 2016-11-29 16:43:58 +00:00 committed by Dimitris Athanasiou
parent 1c98d59db0
commit 5455b5bbad
1 changed files with 179 additions and 173 deletions

View File

@ -184,20 +184,25 @@ public class ElasticsearchMappings {
.endObject()
.endObject()
.endObject()
.endObject()
.endObject()
// bucket influencer mapping
.startObject(Bucket.BUCKET_INFLUENCERS.getPreferredName())
.field(TYPE, NESTED)
.startObject(PROPERTIES)
.startObject(BucketInfluencer.INFLUENCER_FIELD_NAME.getPreferredName())
.field(TYPE, KEYWORD)
.endObject()
.startObject(BucketInfluencer.RAW_ANOMALY_SCORE.getPreferredName())
.field(TYPE, DOUBLE)
.endObject()
// influencer mapping
.startObject(Influencer.INFLUENCER_FIELD_VALUE.getPreferredName())
.endObject()
.endObject()
.startObject(BucketInfluencer.INFLUENCER_FIELD_NAME.getPreferredName())
.field(TYPE, KEYWORD)
.endObject()
// per-partition max probabilities mapping
.startObject(PerPartitionMaxProbabilities.PER_PARTITION_MAX_PROBABILITIES.getPreferredName())
.field(TYPE, NESTED)
@ -223,11 +228,12 @@ public class ElasticsearchMappings {
}
}
builder.endObject()
.endObject()
.endObject()
.endObject()
.endObject();
// End result properties
builder.endObject();
// End result
builder.endObject();
// End mapping
builder.endObject();
return builder;
}