public class TermVectorsRequest extends SingleShardRequest<TermVectorsRequest> implements DocumentRequest<TermVectorsRequest>, RealtimeRequest
Note, the SingleShardRequest.index()
, type(String)
and id(String)
are
required.
Modifier and Type | Class and Description |
---|---|
static class |
TermVectorsRequest.FilterSettings |
static class |
TermVectorsRequest.Flag |
TransportRequest.Empty
IndicesRequest.Replaceable
Modifier and Type | Field and Description |
---|---|
protected String |
preference |
index, INDICES_OPTIONS
headers
Constructor and Description |
---|
TermVectorsRequest() |
TermVectorsRequest(MultiGetRequest.Item item) |
TermVectorsRequest(String index,
String type,
String id)
Constructs a new term vector request for a document that will be fetch
from the provided index.
|
TermVectorsRequest(TermVectorsRequest other)
Constructs a new term vector request for a document that will be fetch
from the provided index.
|
Modifier and Type | Method and Description |
---|---|
boolean |
dfs() |
TermVectorsRequest |
dfs(boolean dfs)
Use distributed frequencies instead of shard statistics.
|
BytesReference |
doc()
Returns the artificial document from which term vectors are requested for.
|
TermVectorsRequest |
doc(BytesReference doc,
boolean generateRandomId)
Sets an artificial document from which term vectors are requested for.
|
TermVectorsRequest |
doc(XContentBuilder documentBuilder)
Sets an artificial document from which term vectors are requested for.
|
boolean |
fieldStatistics() |
TermVectorsRequest |
fieldStatistics(boolean fieldStatistics)
Return the field statistics for each term in the shard or skip.
|
TermVectorsRequest.FilterSettings |
filterSettings()
Return the settings for filtering out terms.
|
TermVectorsRequest |
filterSettings(TermVectorsRequest.FilterSettings settings)
Sets the settings for filtering out terms.
|
EnumSet<TermVectorsRequest.Flag> |
getFlags() |
String |
id()
Returns the id of document the term vector is requested for.
|
TermVectorsRequest |
id(String id)
Sets the id of document the term vector is requested for.
|
boolean |
offsets() |
TermVectorsRequest |
offsets(boolean offsets)
Return the start and stop offsets for each term if they were stored or
skip offsets.
|
TermVectorsRequest |
parent(String parent)
Sets the parent id of this document.
|
static void |
parseRequest(TermVectorsRequest termVectorsRequest,
XContentParser parser)
populates a request object (pre-populated with defaults) based on a parser.
|
boolean |
payloads() |
TermVectorsRequest |
payloads(boolean payloads)
Return the payloads for each term or skip.
|
Map<String,String> |
perFieldAnalyzer()
Return the overridden analyzers at each field.
|
TermVectorsRequest |
perFieldAnalyzer(Map<String,String> perFieldAnalyzer)
Override the analyzer used at each field when generating term vectors.
|
boolean |
positions() |
TermVectorsRequest |
positions(boolean positions)
Return the positions for each term if stored or skip.
|
String |
preference() |
TermVectorsRequest |
preference(String preference)
Sets the preference to execute the search.
|
void |
readFrom(StreamInput in) |
static Map<String,String> |
readPerFieldAnalyzer(Map<String,Object> map) |
static TermVectorsRequest |
readTermVectorsRequest(StreamInput in) |
boolean |
realtime()
Return whether term vectors should be generated real-time (default to true).
|
TermVectorsRequest |
realtime(Boolean realtime)
Choose whether term vectors be generated real-time.
|
String |
routing()
Get the routing for this request
|
TermVectorsRequest |
routing(String routing)
Set the routing for this request
|
Set<String> |
selectedFields()
Return only term vectors for special selected fields.
|
TermVectorsRequest |
selectedFields(String... fields)
Return only term vectors for special selected fields.
|
long |
startTime() |
boolean |
termStatistics() |
TermVectorsRequest |
termStatistics(boolean termStatistics)
Return the term statistics for each term in the shard or skip.
|
String |
type()
Returns the type of document to get the term vector for.
|
TermVectorsRequest |
type(String type)
Sets the type of document to get the term vector for.
|
ActionRequestValidationException |
validate() |
long |
version() |
TermVectorsRequest |
version(long version) |
VersionType |
versionType() |
TermVectorsRequest |
versionType(VersionType versionType) |
void |
writeTo(StreamOutput out) |
index, index, indices, indicesOptions, operationThreaded, operationThreaded, validateNonNullIndex
createTask, getDescription
remoteAddress, remoteAddress
contextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
index, indicesOptions
indices
protected String preference
public TermVectorsRequest()
public TermVectorsRequest(String index, String type, String id)
type(String)
and
id(String)
to specify the document to load.public TermVectorsRequest(TermVectorsRequest other)
type(String)
and
id(String)
to specify the document to load.public TermVectorsRequest(MultiGetRequest.Item item)
public EnumSet<TermVectorsRequest.Flag> getFlags()
public TermVectorsRequest type(String type)
public String type()
type
in interface DocumentRequest<TermVectorsRequest>
public String id()
id
in interface DocumentRequest<TermVectorsRequest>
public TermVectorsRequest id(String id)
public BytesReference doc()
public TermVectorsRequest doc(XContentBuilder documentBuilder)
public TermVectorsRequest doc(BytesReference doc, boolean generateRandomId)
public String routing()
DocumentRequest
routing
in interface DocumentRequest<TermVectorsRequest>
public TermVectorsRequest routing(String routing)
DocumentRequest
routing
in interface DocumentRequest<TermVectorsRequest>
public TermVectorsRequest parent(String parent)
public String preference()
public TermVectorsRequest preference(String preference)
public TermVectorsRequest offsets(boolean offsets)
public boolean offsets()
true
if term offsets should be returned. Otherwise
false
public TermVectorsRequest positions(boolean positions)
public boolean positions()
public boolean payloads()
true
if term payloads should be returned. Otherwise
false
public TermVectorsRequest payloads(boolean payloads)
public boolean termStatistics()
true
if term statistics should be returned.
Otherwise false
public TermVectorsRequest termStatistics(boolean termStatistics)
public boolean fieldStatistics()
true
if field statistics should be returned.
Otherwise false
public TermVectorsRequest fieldStatistics(boolean fieldStatistics)
public boolean dfs()
true
if distributed frequencies should be returned. Otherwise
false
public TermVectorsRequest dfs(boolean dfs)
public Set<String> selectedFields()
public TermVectorsRequest selectedFields(String... fields)
public boolean realtime()
public TermVectorsRequest realtime(Boolean realtime)
realtime
in interface RealtimeRequest
realtime
- Controls whether this request should be realtime by reading from the translog. If null
is specified then whether the operation will be realtime depends on the api of the concrete request
subclass.public Map<String,String> perFieldAnalyzer()
public TermVectorsRequest perFieldAnalyzer(Map<String,String> perFieldAnalyzer)
public TermVectorsRequest.FilterSettings filterSettings()
public TermVectorsRequest filterSettings(TermVectorsRequest.FilterSettings settings)
public long version()
public TermVectorsRequest version(long version)
public VersionType versionType()
public TermVectorsRequest versionType(VersionType versionType)
public long startTime()
public ActionRequestValidationException validate()
validate
in class ActionRequest<TermVectorsRequest>
public static TermVectorsRequest readTermVectorsRequest(StreamInput in) throws IOException
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class SingleShardRequest<TermVectorsRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class SingleShardRequest<TermVectorsRequest>
IOException
public static void parseRequest(TermVectorsRequest termVectorsRequest, XContentParser parser) throws IOException
IOException
Copyright © 2009–2016. All rights reserved.