Class TermVectorsRequest

java.lang.Object
org.elasticsearch.client.core.TermVectorsRequest
All Implemented Interfaces:
Validatable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class TermVectorsRequest extends Object implements org.elasticsearch.xcontent.ToXContentObject, Validatable
  • Constructor Details

    • TermVectorsRequest

      public TermVectorsRequest(String index, String docId)
      Constructs TermVectorRequest for the given document
      Parameters:
      index - - index of the document
      docId - - id of the document
    • TermVectorsRequest

      @Deprecated public TermVectorsRequest(String index, String type, String docId)
      Deprecated.
      Types are in the process of being removed, use TermVectorsRequest(String, String) instead.
      Constructs TermVectorRequest for the given document
      Parameters:
      index - - index of the document
      type - - type of the document
      docId - - id of the document
    • TermVectorsRequest

      public TermVectorsRequest(String index, org.elasticsearch.xcontent.XContentBuilder docBuilder)
      Constructs TermVectorRequest for an artificial document
      Parameters:
      index - - index of the document
      docBuilder - - an artificial document
    • TermVectorsRequest

      @Deprecated public TermVectorsRequest(String index, String type, org.elasticsearch.xcontent.XContentBuilder docBuilder)
      Deprecated.
      Types are in the process of being removed, use TermVectorsRequest(java.lang.String,org.elasticsearch.xcontent.XContentBuilder) instead.
      Constructs TermVectorRequest for an artificial document
      Parameters:
      index - - index of the document
      type - - type of the document
      docBuilder - - an artificial document
  • Method Details

    • getIndex

      public String getIndex()
      Returns the index of the request
    • getType

      @Deprecated public String getType()
      Deprecated.
      Types are in the process of being removed.
      Returns the type of the request
    • getId

      public String getId()
      Returns the id of the request can be NULL if there is no document ID
    • setFields

      public void setFields(String... fields)
      Sets the fields for which term vectors information should be retrieved
    • getFields

      public String[] getFields()
    • setPositions

      public void setPositions(boolean positions)
      Sets whether to request term positions
    • setPayloads

      public void setPayloads(boolean payloads)
      Sets whether to request term payloads
    • setOffsets

      public void setOffsets(boolean offsets)
      Sets whether to request term offsets
    • setFieldStatistics

      public void setFieldStatistics(boolean fieldStatistics)
      Sets whether to request field statistics
    • setTermStatistics

      public void setTermStatistics(boolean termStatistics)
      Sets whether to request term statistics
    • setPerFieldAnalyzer

      public void setPerFieldAnalyzer(Map<String,String> perFieldAnalyzer)
      Sets different analyzers than the one at the fields
    • setFilterSettings

      public void setFilterSettings(Map<String,Integer> filterSettings)
      Sets conditions for terms filtering
    • setRouting

      public void setRouting(String routing)
      Sets a routing to route a request to a particular shard
    • getRouting

      public String getRouting()
    • setPreference

      public void setPreference(String preference)
      Set a preference of which shard copies to execute the request
    • getPreference

      public String getPreference()
    • setRealtime

      public void setRealtime(boolean realtime)
      Sets if the request should be realtime or near-realtime
    • getRealtime

      public boolean getRealtime()
      Returns if the request is realtime(true) or near-realtime(false)
    • 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