Fix AnomalyRecord.Type and remove setParent call

Original commit: elastic/x-pack-elasticsearch@3ffe114ac2
This commit is contained in:
Dimitrios Athanasiou 2016-11-24 10:38:52 +00:00
parent 4562ec9d6c
commit 02c755bfbe
2 changed files with 2 additions and 3 deletions

View File

@ -149,8 +149,7 @@ public class ElasticsearchPersister implements JobResultsPersister, JobRenormali
" to index " + indexName + " with auto-generated ID, for bucket "
+ bucket.getId());
addRecordsRequest.add(client.prepareIndex(indexName, AnomalyRecord.TYPE.getPreferredName())
.setSource(content)
.setParent(bucket.getId()));
.setSource(content));
}
LOGGER.trace("ES API CALL: bulk request with " + addRecordsRequest.numberOfActions() + " actions");

View File

@ -32,7 +32,7 @@ public class AnomalyRecord extends ToXContentToBytes implements Writeable {
/**
* Serialisation fields
*/
public static final ParseField TYPE = new ParseField("results");
public static final ParseField TYPE = new ParseField("record");
/**
* Result fields (all detector types)