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:
Julie Tibshirani 2018-11-16 13:04:43 -08:00 committed by GitHub
parent 4fea6b6f9b
commit c6a0904e0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 491 additions and 77 deletions

View file

@ -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

View file

@ -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"]
--------------------------------------------------