Class VertexRequest

java.lang.Object
org.elasticsearch.client.graph.VertexRequest
All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class VertexRequest extends Object implements org.elasticsearch.xcontent.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.
  • Field Details

  • Constructor Details

    • VertexRequest

      public VertexRequest()
  • Method Details

    • fieldName

      public String fieldName()
    • fieldName

      public VertexRequest fieldName(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 this Hop
    • hasIncludeClauses

      public boolean hasIncludeClauses()
    • hasExcludeClauses

      public boolean hasExcludeClauses()
    • addExclude

      public void addExclude(String term)
      Adds a term that should be excluded from results
      Parameters:
      term - A term to be excluded
    • addInclude

      public void addInclude(String term, float boost)
      Adds a term to the set of allowed values - the boost defines the relative importance when pursuing connections in subsequent Hops. The boost value appears as part of the query.
      Parameters:
      term - a required term
      boost - an optional boost
    • includeValues

      public GraphExploreRequest.TermBoost[] includeValues()
    • includeValuesAsStringArray

      public String[] includeValuesAsStringArray()
    • excludesAsArray

      public 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 org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException