Class IncludeExclude
java.lang.Object
org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude
- All Implemented Interfaces:
Writeable
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
public class IncludeExclude
extends Object
implements Writeable, org.elasticsearch.xcontent.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
Modifier and TypeClassDescriptionstatic class
static class
static class
class
static class
static class
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionIncludeExclude
(double[] includeValues, double[] excludeValues) IncludeExclude
(int partition, int numPartitions) IncludeExclude
(long[] includeValues, long[] excludeValues) IncludeExclude
(String[] includeValues, String[] excludeValues) IncludeExclude
(String include, String exclude) IncludeExclude
(String include, String exclude, String[] includeValues, String[] excludeValues) IncludeExclude
(SortedSet<org.apache.lucene.util.BytesRef> includeValues, SortedSet<org.apache.lucene.util.BytesRef> excludeValues) IncludeExclude
(org.apache.lucene.util.automaton.RegExp include, org.apache.lucene.util.automaton.RegExp exclude) IncludeExclude
(org.apache.lucene.util.automaton.RegExp include, org.apache.lucene.util.automaton.RegExp exclude, SortedSet<org.apache.lucene.util.BytesRef> includeValues, SortedSet<org.apache.lucene.util.BytesRef> excludeValues) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionconvertToLongFilter
(DocValueFormat format) convertToStringFilter
(DocValueFormat format) boolean
int
hashCode()
boolean
boolean
static IncludeExclude
merge
(IncludeExclude include, IncludeExclude exclude) static IncludeExclude
parseExclude
(org.elasticsearch.xcontent.XContentParser parser) static IncludeExclude
parseInclude
(org.elasticsearch.xcontent.XContentParser parser) org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
INCLUDE_FIELD
public static final org.elasticsearch.xcontent.ParseField INCLUDE_FIELD -
EXCLUDE_FIELD
public static final org.elasticsearch.xcontent.ParseField EXCLUDE_FIELD -
PARTITION_FIELD
public static final org.elasticsearch.xcontent.ParseField PARTITION_FIELD -
NUM_PARTITIONS_FIELD
public static final org.elasticsearch.xcontent.ParseField NUM_PARTITIONS_FIELD
-
-
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
-
IncludeExclude
-
IncludeExclude
-
IncludeExclude
public IncludeExclude(SortedSet<org.apache.lucene.util.BytesRef> includeValues, SortedSet<org.apache.lucene.util.BytesRef> excludeValues) - Parameters:
includeValues
- The terms to be includedexcludeValues
- The terms to be excluded
-
IncludeExclude
-
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:
IOException
-
-
Method Details
-
merge
-
parseInclude
public static IncludeExclude parseInclude(org.elasticsearch.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
parseExclude
public static IncludeExclude parseExclude(org.elasticsearch.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
isRegexBased
public boolean isRegexBased() -
isPartitionBased
public boolean isPartitionBased() -
convertToStringFilter
-
convertToOrdinalsFilter
-
convertToLongFilter
-
convertToDoubleFilter
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-