Class IncludeExclude
java.lang.Object
org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
public class IncludeExclude extends java.lang.Object implements Writeable, ToXContentFragment
Defines the include/exclude regular expression filtering for string terms aggregation. In this filtering logic,
exclusion has precedence, where the
include is evaluated first and then the exclude.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIncludeExclude.Filterstatic classIncludeExclude.LongFilterstatic classIncludeExclude.OrdinalsFilterclassIncludeExclude.PartitionedLongFilterstatic classIncludeExclude.SetBackedLongFilterstatic classIncludeExclude.StringFilterNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description static ParseFieldEXCLUDE_FIELDstatic ParseFieldINCLUDE_FIELDstatic ParseFieldNUM_PARTITIONS_FIELDstatic ParseFieldPARTITION_FIELD -
Constructor Summary
Constructors Constructor Description IncludeExclude(double[] includeValues, double[] excludeValues)IncludeExclude(int partition, int numPartitions)IncludeExclude(long[] includeValues, long[] excludeValues)IncludeExclude(java.lang.String[] includeValues, java.lang.String[] excludeValues)IncludeExclude(java.lang.String include, java.lang.String exclude)IncludeExclude(java.util.SortedSet<org.apache.lucene.util.BytesRef> includeValues, java.util.SortedSet<org.apache.lucene.util.BytesRef> excludeValues)IncludeExclude(org.apache.lucene.util.automaton.RegExp include, org.apache.lucene.util.automaton.RegExp exclude)IncludeExclude(StreamInput in)Read from a stream. -
Method Summary
Modifier and Type Method Description IncludeExclude.LongFilterconvertToDoubleFilter()IncludeExclude.LongFilterconvertToLongFilter(DocValueFormat format)IncludeExclude.OrdinalsFilterconvertToOrdinalsFilter(DocValueFormat format)IncludeExclude.StringFilterconvertToStringFilter(DocValueFormat format)booleanequals(java.lang.Object obj)inthashCode()booleanisPartitionBased()booleanisRegexBased()static IncludeExcludemerge(IncludeExclude include, IncludeExclude exclude)static IncludeExcludeparseExclude(XContentParser parser)static IncludeExcludeparseInclude(XContentParser parser)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Field Details
-
Constructor Details
-
IncludeExclude
public IncludeExclude(org.apache.lucene.util.automaton.RegExp include, org.apache.lucene.util.automaton.RegExp exclude)- Parameters:
include- The regular expression pattern for the terms to be includedexclude- The regular expression pattern for the terms to be excluded
-
IncludeExclude
public IncludeExclude(java.lang.String include, java.lang.String exclude) -
IncludeExclude
public IncludeExclude(java.util.SortedSet<org.apache.lucene.util.BytesRef> includeValues, java.util.SortedSet<org.apache.lucene.util.BytesRef> excludeValues)- Parameters:
includeValues- The terms to be includedexcludeValues- The terms to be excluded
-
IncludeExclude
public IncludeExclude(java.lang.String[] includeValues, java.lang.String[] excludeValues) -
IncludeExclude
public IncludeExclude(double[] includeValues, double[] excludeValues) -
IncludeExclude
public IncludeExclude(long[] includeValues, long[] excludeValues) -
IncludeExclude
public IncludeExclude(int partition, int numPartitions) -
IncludeExclude
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
merge
-
parseInclude
- Throws:
java.io.IOException
-
parseExclude
- Throws:
java.io.IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput. -
isRegexBased
public boolean isRegexBased() -
isPartitionBased
public boolean isPartitionBased() -
convertToStringFilter
-
convertToOrdinalsFilter
-
convertToLongFilter
-
convertToDoubleFilter
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-