Class MtermvectorsRequest
- All Implemented Interfaces:
JsonpSerializable
Get multiple term vectors with a single request. You can specify existing
documents by index and ID or provide artificial documents in the body of the
request. You can specify the index in the request body or request URI. The
response contains a docs
array with all the fetched termvectors.
Each element has the structure provided by the termvectors API.
Artificial documents
You can also use mtermvectors
to generate term vectors for
artificial documents provided in the body of the request. The mapping used is
determined by the specified _index
.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<MtermvectorsRequest>
Json deserializer forMtermvectorsRequest
static final Endpoint<MtermvectorsRequest,
MtermvectorsResponse, ErrorResponse> Endpoint "mtermvectors
". -
Method Summary
Modifier and TypeMethodDescriptionfinal List<MultiTermVectorsOperation>
docs()
An array of existing or artificial documents.fields()
A comma-separated list or wildcard expressions of fields to include in the statistics.final Boolean
Iftrue
, the response includes the document count, sum of document frequencies, and sum of total term frequencies.ids()
A simplified syntax to specify documents by their ID if they're in the same index.final String
index()
The name of the index that contains the documents.static MtermvectorsRequest
final Boolean
offsets()
Iftrue
, the response includes term offsets.final Boolean
payloads()
Iftrue
, the response includes term payloads.final Boolean
Iftrue
, the response includes term positions.final String
The node or shard the operation should be performed on.final Boolean
realtime()
If true, the request is real-time as opposed to near-real-time.final String
routing()
A custom value used to route operations to a specific shard.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Boolean
If true, the response includes term frequency and document frequency.final Long
version()
Iftrue
, returns the document version as part of a hit.final VersionType
The version type.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forMtermvectorsRequest
-
_ENDPOINT
Endpoint "mtermvectors
".
-
-
Method Details
-
of
public static MtermvectorsRequest of(Function<MtermvectorsRequest.Builder, ObjectBuilder<MtermvectorsRequest>> fn) -
docs
An array of existing or artificial documents.API name:
docs
-
fieldStatistics
Iftrue
, the response includes the document count, sum of document frequencies, and sum of total term frequencies.API name:
field_statistics
-
fields
A comma-separated list or wildcard expressions of fields to include in the statistics. It is used as the default list unless a specific field list is provided in thecompletion_fields
orfielddata_fields
parameters.API name:
fields
-
ids
A simplified syntax to specify documents by their ID if they're in the same index.API name:
ids
-
index
The name of the index that contains the documents.API name:
index
-
offsets
Iftrue
, the response includes term offsets.API name:
offsets
-
payloads
Iftrue
, the response includes term payloads.API name:
payloads
-
positions
Iftrue
, the response includes term positions.API name:
positions
-
preference
The node or shard the operation should be performed on. It is random by default.API name:
preference
-
realtime
If true, the request is real-time as opposed to near-real-time.API name:
realtime
-
routing
A custom value used to route operations to a specific shard.API name:
routing
-
termStatistics
If true, the response includes term frequency and document frequency.API name:
term_statistics
-
version
Iftrue
, returns the document version as part of a hit.API name:
version
-
versionType
The version type.API name:
version_type
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupMtermvectorsRequestDeserializer
protected static void setupMtermvectorsRequestDeserializer(ObjectDeserializer<MtermvectorsRequest.Builder> op)
-