Class 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.
    • Constructor Detail

      • VertexRequest

        public VertexRequest()
    • 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 this Hop
      • 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 subsequent Hops. The boost value appears as part of the query.
        Parameters:
        term - a required term
        boost - an optional boost
      • 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