Module org.elasticsearch.xcore
Class CategoryDefinition
java.lang.Object
org.elasticsearch.xpack.core.ml.job.results.CategoryDefinition
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ConstructingObjectParser<CategoryDefinition, Void> static final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ConstructingObjectParser<CategoryDefinition, Void> static final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldLegacy type, now used only as a discriminant in the document IDFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExample(String example) booleanlonggetId()getJobId()longlonglong[]getRegex()getTerms()inthashCode()voidsetCategoryId(long categoryId) voidsetExamples(Collection<String> examples) voidsetGrokPattern(String grokPattern) voidsetMaxMatchingLength(long maxMatchingLength) voidsetNumMatches(long numMatches) voidsetPartitionFieldName(String partitionFieldName) voidsetPartitionFieldValue(String partitionFieldValue) voidsetPreferredToCategories(long[] preferredToCategories) voidvoidorg.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
TYPE
public static final org.elasticsearch.xcontent.ParseField TYPELegacy type, now used only as a discriminant in the document ID -
CATEGORY_ID
public static final org.elasticsearch.xcontent.ParseField CATEGORY_ID -
PARTITION_FIELD_NAME
public static final org.elasticsearch.xcontent.ParseField PARTITION_FIELD_NAME -
PARTITION_FIELD_VALUE
public static final org.elasticsearch.xcontent.ParseField PARTITION_FIELD_VALUE -
TERMS
public static final org.elasticsearch.xcontent.ParseField TERMS -
REGEX
public static final org.elasticsearch.xcontent.ParseField REGEX -
MAX_MATCHING_LENGTH
public static final org.elasticsearch.xcontent.ParseField MAX_MATCHING_LENGTH -
EXAMPLES
public static final org.elasticsearch.xcontent.ParseField EXAMPLES -
GROK_PATTERN
public static final org.elasticsearch.xcontent.ParseField GROK_PATTERN -
NUM_MATCHES
public static final org.elasticsearch.xcontent.ParseField NUM_MATCHES -
PREFERRED_TO_CATEGORIES
public static final org.elasticsearch.xcontent.ParseField PREFERRED_TO_CATEGORIES -
MLCATEGORY
public static final org.elasticsearch.xcontent.ParseField MLCATEGORY -
RESULTS_FIELD
public static final org.elasticsearch.xcontent.ParseField RESULTS_FIELD -
STRICT_PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<CategoryDefinition,Void> STRICT_PARSER -
LENIENT_PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<CategoryDefinition,Void> LENIENT_PARSER
-
-
Constructor Details
-
CategoryDefinition
-
CategoryDefinition
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getJobId
-
getId
-
getCategoryId
public long getCategoryId() -
setCategoryId
public void setCategoryId(long categoryId) -
getPartitionFieldName
-
setPartitionFieldName
-
getPartitionFieldValue
-
setPartitionFieldValue
-
getTerms
-
setTerms
-
getRegex
-
setRegex
-
getMaxMatchingLength
public long getMaxMatchingLength() -
setMaxMatchingLength
public void setMaxMatchingLength(long maxMatchingLength) -
getExamples
-
setExamples
-
addExample
-
getGrokPattern
-
setGrokPattern
-
getPreferredToCategories
public long[] getPreferredToCategories() -
setPreferredToCategories
public void setPreferredToCategories(long[] preferredToCategories) -
getNumMatches
public long getNumMatches() -
setNumMatches
public void setNumMatches(long numMatches) -
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-