[ML] Remove record_count from ML mappings (elastic/x-pack-elasticsearch#2183)
record_count is no longer written to new results, but is still tolerated for backwards compatibility. However, in the backwards compatibility case the results index must already contain the required mapping. There's no need to add this mapping to newly created results indices. Original commit: elastic/x-pack-elasticsearch@e586f3ba96
This commit is contained in:
parent
a7d6138f83
commit
39bc5886f2
|
@ -205,9 +205,6 @@ public class ElasticsearchMappings {
|
|||
.startObject(Result.IS_INTERIM.getPreferredName())
|
||||
.field(TYPE, BOOLEAN)
|
||||
.endObject()
|
||||
.startObject(Bucket.RECORD_COUNT.getPreferredName())
|
||||
.field(TYPE, LONG)
|
||||
.endObject()
|
||||
.startObject(Bucket.EVENT_COUNT.getPreferredName())
|
||||
.field(TYPE, LONG)
|
||||
.endObject()
|
||||
|
|
|
@ -38,7 +38,6 @@ public class Bucket implements ToXContentObject, Writeable {
|
|||
|
||||
public static final ParseField ANOMALY_SCORE = new ParseField("anomaly_score");
|
||||
public static final ParseField INITIAL_ANOMALY_SCORE = new ParseField("initial_anomaly_score");
|
||||
public static final ParseField RECORD_COUNT = new ParseField("record_count");
|
||||
public static final ParseField EVENT_COUNT = new ParseField("event_count");
|
||||
public static final ParseField RECORDS = new ParseField("records");
|
||||
public static final ParseField BUCKET_INFLUENCERS = new ParseField("bucket_influencers");
|
||||
|
@ -46,6 +45,9 @@ public class Bucket implements ToXContentObject, Writeable {
|
|||
public static final ParseField PROCESSING_TIME_MS = new ParseField("processing_time_ms");
|
||||
public static final ParseField PARTITION_SCORES = new ParseField("partition_scores");
|
||||
|
||||
// Only exists for backwards compatibility; no longer added to mappings
|
||||
private static final ParseField RECORD_COUNT = new ParseField("record_count");
|
||||
|
||||
// Used for QueryPage
|
||||
public static final ParseField RESULTS_FIELD = new ParseField("buckets");
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ public final class ReservedFieldNames {
|
|||
Bucket.ANOMALY_SCORE.getPreferredName(),
|
||||
Bucket.BUCKET_INFLUENCERS.getPreferredName(),
|
||||
Bucket.BUCKET_SPAN.getPreferredName(),
|
||||
Bucket.RECORD_COUNT.getPreferredName(),
|
||||
Bucket.EVENT_COUNT.getPreferredName(),
|
||||
Bucket.INITIAL_ANOMALY_SCORE.getPreferredName(),
|
||||
Bucket.PROCESSING_TIME_MS.getPreferredName(),
|
||||
|
|
Loading…
Reference in New Issue