public class TermVectorRequest extends SingleShardOperationRequest<TermVectorRequest> implements DocumentRequest<TermVectorRequest>
SingleShardOperationRequest.index()
, type(String)
and id(String)
are
required.Modifier and Type | Class and Description |
---|---|
static class |
TermVectorRequest.Flag |
TransportRequest.Empty
IndicesRequest.Replaceable
Modifier and Type | Field and Description |
---|---|
protected String |
preference |
index, INDICES_OPTIONS
Constructor and Description |
---|
TermVectorRequest() |
TermVectorRequest(MultiGetRequest.Item item) |
TermVectorRequest(String index,
String type,
String id)
Constructs a new term vector request for a document that will be fetch
from the provided index.
|
TermVectorRequest(TermVectorRequest other)
Constructs a new term vector request for a document that will be fetch
from the provided index.
|
Modifier and Type | Method and Description |
---|---|
BytesReference |
doc()
Returns the artificial document from which term vectors are requested for.
|
TermVectorRequest |
doc(BytesReference doc,
boolean generateRandomId)
Sets an artificial document from which term vectors are requested for.
|
TermVectorRequest |
doc(XContentBuilder documentBuilder)
Sets an artificial document from which term vectors are requested for.
|
boolean |
fieldStatistics() |
TermVectorRequest |
fieldStatistics(boolean fieldStatistics)
Return the field statistics for each term in the shard or skip.
|
EnumSet<TermVectorRequest.Flag> |
getFlags() |
String |
id()
Returns the id of document the term vector is requested for.
|
TermVectorRequest |
id(String id)
Sets the id of document the term vector is requested for.
|
boolean |
offsets() |
TermVectorRequest |
offsets(boolean offsets)
Return the start and stop offsets for each term if they were stored or
skip offsets.
|
TermVectorRequest |
parent(String parent)
Sets the parent id of this document.
|
static void |
parseRequest(TermVectorRequest termVectorRequest,
XContentParser parser)
populates a request object (pre-populated with defaults) based on a parser.
|
boolean |
payloads() |
TermVectorRequest |
payloads(boolean payloads)
Return the payloads for each term or skip.
|
Map<String,String> |
perFieldAnalyzer()
Return the overridden analyzers at each field
|
TermVectorRequest |
perFieldAnalyzer(Map<String,String> perFieldAnalyzer)
Override the analyzer used at each field when generating term vectors
|
boolean |
positions() |
TermVectorRequest |
positions(boolean positions)
Return the positions for each term if stored or skip.
|
String |
preference() |
TermVectorRequest |
preference(String preference)
Sets the preference to execute the search.
|
void |
readFrom(StreamInput in) |
static TermVectorRequest |
readTermVectorRequest(StreamInput in) |
boolean |
realtime() |
TermVectorRequest |
realtime(Boolean realtime) |
String |
routing()
Get the routing for this request
|
TermVectorRequest |
routing(String routing)
Set the routing for this request
|
Set<String> |
selectedFields()
Return only term vectors for special selected fields.
|
TermVectorRequest |
selectedFields(String... fields)
Return only term vectors for special selected fields.
|
long |
startTime() |
boolean |
termStatistics() |
TermVectorRequest |
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.
|
TermVectorRequest |
type(String type)
Sets the type of document to get the term vector for.
|
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out) |
beforeLocalFork, index, index, indices, indicesOptions, operationThreaded, operationThreaded
listenerThreaded, listenerThreaded
getHeader, getHeaders, hasHeader, putHeader, remoteAddress, remoteAddress
contextSize, copyContextFrom, getContext, getFromContext, getFromContext, hasInContext, isContextEmpty, putAllInContext, putInContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
index, indicesOptions
protected String preference
public TermVectorRequest()
public TermVectorRequest(String index, String type, String id)
type(String)
and
id(String)
to specify the document to load.public TermVectorRequest(TermVectorRequest other)
type(String)
and
id(String)
to specify the document to load.public TermVectorRequest(MultiGetRequest.Item item)
public EnumSet<TermVectorRequest.Flag> getFlags()
public TermVectorRequest type(String type)
public String type()
type
in interface DocumentRequest<TermVectorRequest>
public String id()
id
in interface DocumentRequest<TermVectorRequest>
public TermVectorRequest id(String id)
public BytesReference doc()
public TermVectorRequest doc(XContentBuilder documentBuilder)
public TermVectorRequest doc(BytesReference doc, boolean generateRandomId)
public String routing()
DocumentRequest
routing
in interface DocumentRequest<TermVectorRequest>
public TermVectorRequest routing(String routing)
DocumentRequest
routing
in interface DocumentRequest<TermVectorRequest>
public TermVectorRequest parent(String parent)
public String preference()
public TermVectorRequest preference(String preference)
public TermVectorRequest offsets(boolean offsets)
public boolean offsets()
true
if term offsets should be returned. Otherwise
false
public TermVectorRequest positions(boolean positions)
public boolean positions()
public boolean payloads()
true
if term payloads should be returned. Otherwise
false
public TermVectorRequest payloads(boolean payloads)
public boolean termStatistics()
true
if term statistics should be returned.
Otherwise false
public TermVectorRequest termStatistics(boolean termStatistics)
public boolean fieldStatistics()
true
if field statistics should be returned.
Otherwise false
public TermVectorRequest fieldStatistics(boolean fieldStatistics)
public Set<String> selectedFields()
public TermVectorRequest selectedFields(String... fields)
public boolean realtime()
public TermVectorRequest realtime(Boolean realtime)
public Map<String,String> perFieldAnalyzer()
public TermVectorRequest perFieldAnalyzer(Map<String,String> perFieldAnalyzer)
public long startTime()
public ActionRequestValidationException validate()
validate
in class SingleShardOperationRequest<TermVectorRequest>
public static TermVectorRequest readTermVectorRequest(StreamInput in) throws IOException
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class SingleShardOperationRequest<TermVectorRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class SingleShardOperationRequest<TermVectorRequest>
IOException
public static void parseRequest(TermVectorRequest termVectorRequest, XContentParser parser) throws IOException
IOException
Copyright © 2009–2015. All rights reserved.