Package org.elasticsearch.client.core
Class TermVectorsRequest
- java.lang.Object
-
- org.elasticsearch.client.core.TermVectorsRequest
-
- All Implemented Interfaces:
Validatable
,ToXContent
,ToXContentObject
public class TermVectorsRequest extends java.lang.Object implements ToXContentObject, Validatable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Fields inherited from interface org.elasticsearch.client.Validatable
EMPTY
-
-
Constructor Summary
Constructors Constructor Description TermVectorsRequest(java.lang.String index, java.lang.String type, java.lang.String docId)
Constructs TermVectorRequest for the given documentTermVectorsRequest(java.lang.String index, java.lang.String type, XContentBuilder docBuilder)
Constructs TermVectorRequest for an artificial document
-
Method Summary
Modifier and Type Method Description java.lang.String[]
getFields()
java.lang.String
getId()
Returns the id of the request can be NULL if there is no document IDjava.lang.String
getIndex()
Returns the index of the requestjava.lang.String
getPreference()
boolean
getRealtime()
Returns if the request is realtime(true) or near-realtime(false)java.lang.String
getRouting()
java.lang.String
getType()
Returns the type of the requestvoid
setFields(java.lang.String... fields)
Sets the fields for which term vectors information should be retrievedvoid
setFieldStatistics(boolean requestFieldStatistics)
Sets whether to request field statisticsvoid
setFilterSettings(java.util.Map<java.lang.String,java.lang.Integer> filterSettings)
Sets conditions for terms filteringvoid
setOffsets(boolean requestOffsets)
Sets whether to request term offsetsvoid
setPayloads(boolean requestPayloads)
Sets whether to request term payloadsvoid
setPerFieldAnalyzer(java.util.Map<java.lang.String,java.lang.String> perFieldAnalyzer)
Sets different analyzers than the one at the fieldsvoid
setPositions(boolean requestPositions)
Sets whether to request term positionsvoid
setPreference(java.lang.String preference)
Set a preference of which shard copies to execute the requestvoid
setRealtime(boolean realtime)
Sets if the request should be realtime or near-realtimevoid
setRouting(java.lang.String routing)
Sets a routing to route a request to a particular shardvoid
setTermStatistics(boolean requestTermStatistics)
Sets whether to request term statisticsXContentBuilder
toXContent(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
-
Methods inherited from interface org.elasticsearch.client.Validatable
validate
-
-
-
-
Constructor Detail
-
TermVectorsRequest
public TermVectorsRequest(java.lang.String index, java.lang.String type, java.lang.String docId)
Constructs TermVectorRequest for the given document- Parameters:
index
- - index of the documenttype
- - type of the documentdocId
- - id of the document
-
TermVectorsRequest
public TermVectorsRequest(java.lang.String index, java.lang.String type, XContentBuilder docBuilder)
Constructs TermVectorRequest for an artificial document- Parameters:
index
- - index of the documenttype
- - type of the documentdocBuilder
- - an artificial document
-
-
Method Detail
-
getIndex
public java.lang.String getIndex()
Returns the index of the request
-
getType
public java.lang.String getType()
Returns the type of the request
-
getId
public java.lang.String getId()
Returns the id of the request can be NULL if there is no document ID
-
setFields
public void setFields(java.lang.String... fields)
Sets the fields for which term vectors information should be retrieved
-
getFields
public java.lang.String[] getFields()
-
setPositions
public void setPositions(boolean requestPositions)
Sets whether to request term positions
-
setPayloads
public void setPayloads(boolean requestPayloads)
Sets whether to request term payloads
-
setOffsets
public void setOffsets(boolean requestOffsets)
Sets whether to request term offsets
-
setFieldStatistics
public void setFieldStatistics(boolean requestFieldStatistics)
Sets whether to request field statistics
-
setTermStatistics
public void setTermStatistics(boolean requestTermStatistics)
Sets whether to request term statistics
-
setPerFieldAnalyzer
public void setPerFieldAnalyzer(java.util.Map<java.lang.String,java.lang.String> perFieldAnalyzer)
Sets different analyzers than the one at the fields
-
setFilterSettings
public void setFilterSettings(java.util.Map<java.lang.String,java.lang.Integer> filterSettings)
Sets conditions for terms filtering
-
setRouting
public void setRouting(java.lang.String routing)
Sets a routing to route a request to a particular shard
-
getRouting
public java.lang.String getRouting()
-
setPreference
public void setPreference(java.lang.String preference)
Set a preference of which shard copies to execute the request
-
getPreference
public java.lang.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 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
-