Package org.elasticsearch.client.graph
Class VertexRequest
- java.lang.Object
-
- org.elasticsearch.client.graph.VertexRequest
-
- All Implemented Interfaces:
ToXContent
,ToXContentObject
public class VertexRequest extends java.lang.Object implements ToXContentObject
A request to identify terms from a choice of field as part of aHop
. Optionally, a set of terms can be provided that are used as an exclusion or inclusion list to filter which terms are considered.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MIN_DOC_COUNT
static int
DEFAULT_SHARD_MIN_DOC_COUNT
static int
DEFAULT_SIZE
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description VertexRequest()
-
Method Summary
Modifier and Type Method Description void
addExclude(java.lang.String term)
Adds a term that should be excluded from resultsvoid
addInclude(java.lang.String term, float boost)
Adds a term to the set of allowed values - the boost defines the relative importance when pursuing connections in subsequentHop
s.java.lang.String[]
excludesAsArray()
java.lang.String
fieldName()
VertexRequest
fieldName(java.lang.String fieldName)
boolean
hasExcludeClauses()
boolean
hasIncludeClauses()
GraphExploreRequest.TermBoost[]
includeValues()
java.lang.String[]
includeValuesAsStringArray()
int
minDocCount()
VertexRequest
minDocCount(int value)
A "certainty" threshold which defines the weight-of-evidence required before a term found in this field is identified as a useful connectionint
shardMinDocCount()
VertexRequest
shardMinDocCount(int value)
A "certainty" threshold which defines the weight-of-evidence required before a term found in this field is identified as a useful connectionint
size()
VertexRequest
size(int size)
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Field Detail
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_MIN_DOC_COUNT
public static final int DEFAULT_MIN_DOC_COUNT
- See Also:
- Constant Field Values
-
DEFAULT_SHARD_MIN_DOC_COUNT
public static final int DEFAULT_SHARD_MIN_DOC_COUNT
- See Also:
- Constant Field Values
-
-
Method Detail
-
fieldName
public java.lang.String fieldName()
-
fieldName
public VertexRequest fieldName(java.lang.String fieldName)
-
size
public int size()
-
size
public VertexRequest size(int size)
- Parameters:
size
- The maximum number of terms that should be returned from this field as part of thisHop
-
hasIncludeClauses
public boolean hasIncludeClauses()
-
hasExcludeClauses
public boolean hasExcludeClauses()
-
addExclude
public void addExclude(java.lang.String term)
Adds a term that should be excluded from results- Parameters:
term
- A term to be excluded
-
addInclude
public void addInclude(java.lang.String term, float boost)
Adds a term to the set of allowed values - the boost defines the relative importance when pursuing connections in subsequentHop
s. The boost value appears as part of the query.- Parameters:
term
- a required termboost
- an optional boost
-
includeValues
public GraphExploreRequest.TermBoost[] includeValues()
-
includeValuesAsStringArray
public java.lang.String[] includeValuesAsStringArray()
-
excludesAsArray
public java.lang.String[] excludesAsArray()
-
minDocCount
public int minDocCount()
-
minDocCount
public VertexRequest minDocCount(int value)
A "certainty" threshold which defines the weight-of-evidence required before a term found in this field is identified as a useful connection- Parameters:
value
- The minimum number of documents that contain this term found in the samples used across all shards
-
shardMinDocCount
public int shardMinDocCount()
-
shardMinDocCount
public VertexRequest shardMinDocCount(int value)
A "certainty" threshold which defines the weight-of-evidence required before a term found in this field is identified as a useful connection- Parameters:
value
- The minimum number of documents that contain this term found in the samples used across all shards
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
-