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