mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
Deprecate types in count and msearch. (#35421)
* Deprecate types in count requests. * Move RestCountAction to the 'search' package. * Deprecate types in multi search requests. * Add tests for types deprecation in the _search endpoint.
This commit is contained in:
parent
4fea6b6f9b
commit
c6a0904e0e
21 changed files with 491 additions and 77 deletions
|
@ -29,34 +29,16 @@ include-tagged::{doc-tests-file}[{api}-request-basic]
|
|||
[[java-rest-high-count-request-optional]]
|
||||
===== Count Request optional arguments
|
||||
|
||||
Let's first look at some of the optional arguments of a +{request}+:
|
||||
A +{request}+ also takes the following optional arguments:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request-indices-types]
|
||||
include-tagged::{doc-tests-file}[{api}-request-args]
|
||||
--------------------------------------------------
|
||||
<1> Restricts the request to an index
|
||||
<2> Limits the request to a type
|
||||
|
||||
There are a couple of other interesting optional parameters:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request-routing]
|
||||
--------------------------------------------------
|
||||
<1> Set a routing parameter
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request-indicesOptions]
|
||||
--------------------------------------------------
|
||||
<1> Setting `IndicesOptions` controls how unavailable indices are resolved and how wildcard expressions are expanded
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request-preference]
|
||||
--------------------------------------------------
|
||||
<1> Use the preference parameter e.g. to execute the search to prefer local shards. The default is to randomize across shards.
|
||||
<2> Set a routing parameter
|
||||
<3> Setting `IndicesOptions` controls how unavailable indices are resolved and how wildcard expressions are expanded
|
||||
<4> Use the preference parameter e.g. to execute the search to prefer local shards. The default is to randomize across shards.
|
||||
|
||||
===== Using the SearchSourceBuilder in CountRequest
|
||||
|
||||
|
|
|
@ -289,8 +289,8 @@ be iterated over:
|
|||
include-tagged::{doc-tests-file}[{api}-hits-singleHit]
|
||||
--------------------------------------------------
|
||||
|
||||
The `SearchHit` provides access to basic information like index, type, docId and
|
||||
score of each search hit:
|
||||
The `SearchHit` provides access to basic information like index, document ID
|
||||
and score of each search hit:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue