[ML] add min_version field to machine learning results index mapping (#37115)

* ML: add min_version field to mapping

* Adding min_version as reserved field name
This commit is contained in:
Benjamin Trent 2019-01-03 14:59:42 -06:00 committed by GitHub
parent d6acd8e15f
commit 2c3ce5b9de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -898,6 +898,8 @@ public class ElasticsearchMappings {
builder.startObject(ModelSnapshot.QUANTILES.getPreferredName())
.field(ENABLED, false)
.endObject().startObject(ModelSnapshot.MIN_VERSION.getPreferredName())
.field(TYPE, KEYWORD)
.endObject()
.startObject(ModelSnapshot.LATEST_RECORD_TIME.getPreferredName())
.field(TYPE, DATE)

View File

@ -167,6 +167,7 @@ public final class ReservedFieldNames {
ModelSnapshot.LATEST_RECORD_TIME.getPreferredName(),
ModelSnapshot.LATEST_RESULT_TIME.getPreferredName(),
ModelSnapshot.RETAIN.getPreferredName(),
ModelSnapshot.MIN_VERSION.getPreferredName(),
Result.RESULT_TYPE.getPreferredName(),
Result.TIMESTAMP.getPreferredName(),