You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds the ability to the Term Vector API to generate term vectors for
artifical documents, that is for documents not present in the index. Following
a similar syntax to the Percolator API, a new 'doc' parameter is used, instead
of '_id', that specifies the document of interest. The parameters '_index' and
'_type' determine the mapping and therefore analyzers to apply to each value
field.
Closes#7530
Parameters can also be set by passing them as uri parameters (see <<docs-termvectors,termvectors>>). uri parameters are the default parameters and are overwritten by any parameter setting defined in the body.
95
+
Additionally coming[1.4.0], just like for the <<docs-termvectors,termvectors>>
96
+
API, term vectors could be generated for user provided documents. The syntax
97
+
is similar to the <<search-percolate,percolator>> API. The mapping used is
@@ -41,10 +42,10 @@ statistics are returned for all fields but no term statistics.
41
42
* term payloads (`payloads` : true), as base64 encoded bytes
42
43
43
44
If the requested information wasn't stored in the index, it will be
44
-
computed on the fly if possible. See <<mapping-types,type mapping>>
45
-
for how to configure your index to store term vectors.
45
+
computed on the fly if possible. Additionally, term vectors could be computed
46
+
for documents not even existing in the index, but instead provided by the user.
46
47
47
-
coming[1.4.0,The ability to computed term vectors on the fly is only available from 1.4.0 onwards (see below)]
48
+
coming[1.4.0,The ability to computed term vectors on the fly as well as support for artificial documents is only available from 1.4.0 onwards (see below example 2 and 3 respectively)]
48
49
49
50
[WARNING]
50
51
======
@@ -86,7 +87,9 @@ The term and field statistics are not accurate. Deleted documents
86
87
are not taken into account. The information is only retrieved for the
87
88
shard the requested document resides in. The term and field statistics
88
89
are therefore only useful as relative measures whereas the absolute
89
-
numbers have no meaning in this context.
90
+
numbers have no meaning in this context. By default, when requesting
91
+
term vectors of artificial documents, a shard to get the statistics from
92
+
is randomly selected. Use `routing` only to hit a particular shard.
90
93
91
94
[float]
92
95
=== Example 1
@@ -231,7 +234,7 @@ Response:
231
234
[float]
232
235
=== Example 2 coming[1.4.0]
233
236
234
-
Additionally, term vectors which are not explicitly stored in the index are automatically
237
+
Term vectors which are not explicitly stored in the index are automatically
235
238
computed on the fly. The following request returns all information and statistics for the
236
239
fields in document `1`, even though the terms haven't been explicitly stored in the index.
237
240
Note that for the field `text`, the terms are not re-generated.
0 commit comments