mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
parent
b2057138a7
commit
aaeb47d1f7
13 changed files with 522 additions and 8 deletions
|
@ -0,0 +1,59 @@
|
|||
--
|
||||
:api: multi-term-vectors
|
||||
:request: MultiTermVectorsRequest
|
||||
:response: MultiTermVectorsResponse
|
||||
:tvrequest: TermVectorsRequest
|
||||
--
|
||||
|
||||
[id="{upid}-{api}"]
|
||||
=== Multi Term Vectors API
|
||||
|
||||
Multi Term Vectors API allows to get multiple term vectors at once.
|
||||
|
||||
[id="{upid}-{api}-request"]
|
||||
==== Multi Term Vectors Request
|
||||
There are two ways to create a +{request}+.
|
||||
|
||||
The first way is to create an empty +{request}+, and then add individual
|
||||
<<java-rest-high-document-term-vectors, term vectors requests>> to it.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request]
|
||||
--------------------------------------------------
|
||||
<1> Create an empty +{request}+.
|
||||
<2> Add the first +{tvrequest}+ to the +{request}+.
|
||||
<3> Add the second +{tvrequest}+ for an artificial doc to the +{request}+.
|
||||
|
||||
|
||||
The second way can be used when all term vectors requests share the same
|
||||
arguments, such as index, type, and other settings. In this case, a template
|
||||
+{tvrequest}+ can be created with all necessary settings set, and
|
||||
this template request can be passed to +{request}+ along with all
|
||||
documents' ids for which to execute these requests.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request-template]
|
||||
--------------------------------------------------
|
||||
<1> Create a template +{tvrequest}+.
|
||||
<2> Pass documents' ids and the template to the +{request}+.
|
||||
|
||||
|
||||
include::../execution.asciidoc[]
|
||||
|
||||
|
||||
[id="{upid}-{api}-response"]
|
||||
==== Multi Term Vectors Response
|
||||
|
||||
+{response}+ allows to get the list of term vectors responses,
|
||||
each of which can be inspected as described in
|
||||
<<java-rest-high-document-term-vectors>>.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-response]
|
||||
--------------------------------------------------
|
||||
<1> Get a list of `TermVectorsResponse`
|
||||
|
||||
|
|
@ -24,6 +24,7 @@ Multi-document APIs::
|
|||
* <<{upid}-update-by-query>>
|
||||
* <<{upid}-delete-by-query>>
|
||||
* <<{upid}-rethrottle>>
|
||||
* <<{upid}-multi-term-vectors>>
|
||||
|
||||
include::document/index.asciidoc[]
|
||||
include::document/get.asciidoc[]
|
||||
|
@ -37,6 +38,8 @@ include::document/reindex.asciidoc[]
|
|||
include::document/update-by-query.asciidoc[]
|
||||
include::document/delete-by-query.asciidoc[]
|
||||
include::document/rethrottle.asciidoc[]
|
||||
include::document/multi-term-vectors.asciidoc[]
|
||||
|
||||
|
||||
== Search APIs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue