Class ReservedFieldNames

java.lang.Object
org.elasticsearch.xpack.core.ml.job.results.ReservedFieldNames

public final class ReservedFieldNames extends Object
Defines the field names that we use for our results. Fields from the raw data with these names are not added to any result. Even different types of results will not have raw data fields with reserved names added to them, as it could create confusion if in some results a given field contains raw data and in others it contains some aspect of our output.
  • Field Details

    • RESERVED_RESULT_FIELD_NAMES

      public static final Set<String> RESERVED_RESULT_FIELD_NAMES
      A set of all reserved field names in our results. Fields from the raw data with these names are not added to any result.
  • Method Details

    • isValidFieldName

      public static boolean isValidFieldName(String fieldName)
      Test if fieldName is one of the reserved result fieldnames or if it contains dots then that the segment before the first dot is not a reserved results fieldname. A fieldName containing dots represents nested fields in which case we only care about the top level.
      Parameters:
      fieldName - Document field name. This may contain dots '.'
      Returns:
      True if fieldName is not a reserved results fieldname or the top level segment is not a reserved name.