java.lang.Object
org.elasticsearch.xpack.core.ml.job.process.autodetect.state.CategorizerState

public class CategorizerState extends Object
The categorizer state does not need to be understood on the Java side. The Java code only needs to know how to form the document IDs so that it can retrieve and delete the correct documents.
  • Field Details

    • TYPE

      public static final String TYPE
      Legacy type, now used only as a discriminant in the document ID
      See Also:
  • Method Details

    • documentId

      public static final String documentId(String jobId, int docNum)
    • documentPrefix

      public static final String documentPrefix(String jobId)
    • v54DocumentId

      public static final String v54DocumentId(String jobId, int docNum)
      This is how the IDs were formed in v5.4
    • v54DocumentPrefix

      public static final String v54DocumentPrefix(String jobId)
    • extractJobId

      public static final String extractJobId(String docId)
      Given the id of a categorizer state document it extracts the job id
      Parameters:
      docId - the categorizer state document id
      Returns:
      the job id or null if the id is not valid