Class VertexRequest
- java.lang.Object
-
- org.elasticsearch.protocol.xpack.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 intDEFAULT_MIN_DOC_COUNTstatic intDEFAULT_SHARD_MIN_DOC_COUNTstatic intDEFAULT_SIZE-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description VertexRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExclude(java.lang.String term)Adds a term that should be excluded from resultsvoidaddInclude(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 subsequentHops.java.lang.String[]excludesAsArray()java.lang.StringfieldName()VertexRequestfieldName(java.lang.String fieldName)booleanhasExcludeClauses()booleanhasIncludeClauses()GraphExploreRequest.TermBoost[]includeValues()java.lang.String[]includeValuesAsStringArray()intminDocCount()VertexRequestminDocCount(int value)A "certainty" threshold which defines the weight-of-evidence required before a term found in this field is identified as a useful connectionintshardMinDocCount()VertexRequestshardMinDocCount(int value)A "certainty" threshold which defines the weight-of-evidence required before a term found in this field is identified as a useful connectionintsize()VertexRequestsize(int size)XContentBuildertoXContent(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 subsequentHops. 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:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
-