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 a
Hop
.
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
-
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)
-
Field Details
-
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
-
-
Constructor Details
-
VertexRequest
public VertexRequest()
-
-
Method Details
-
fieldName
public java.lang.String fieldName() -
fieldName
-
size
public int size() -
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
-
includeValuesAsStringArray
public java.lang.String[] includeValuesAsStringArray() -
excludesAsArray
public java.lang.String[] excludesAsArray() -
minDocCount
public int minDocCount() -
minDocCount
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
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
-