mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Merge remote-tracking branch 'es/master' into enrich
This commit is contained in:
commit
5707bc7f5d
593 changed files with 20103 additions and 11749 deletions
|
@ -4,9 +4,10 @@
|
|||
This page lists all the available search queries with their corresponding `QueryBuilder` class name and helper method name in the
|
||||
`QueryBuilders` utility class.
|
||||
|
||||
:query-ref: {elasticsearch-javadoc}/org/elasticsearch/index/query
|
||||
:parentjoin-ref: {parent-join-client-javadoc}/org/elasticsearch/join/query
|
||||
:percolate-ref: {percolator-client-javadoc}/org/elasticsearch/percolator
|
||||
:query-ref: {elasticsearch-javadoc}/org/elasticsearch/index/query
|
||||
:mapper-extras-ref: {mapper-extras-client-javadoc}/org/elasticsearch/index/query
|
||||
:parentjoin-ref: {parent-join-client-javadoc}/org/elasticsearch/join/query
|
||||
:percolate-ref: {percolator-client-javadoc}/org/elasticsearch/percolator
|
||||
|
||||
==== Match All Query
|
||||
[options="header"]
|
||||
|
@ -81,6 +82,7 @@ This page lists all the available search queries with their corresponding `Query
|
|||
| {ref}/query-dsl-script-query.html[Script] | {query-ref}/ScriptQueryBuilder.html[ScriptQueryBuilder] | {query-ref}/QueryBuilders.html#scriptQuery-org.elasticsearch.script.Script-[QueryBuilders.scriptQuery()]
|
||||
| {ref}/query-dsl-percolate-query.html[Percolate] | {percolate-ref}/PercolateQueryBuilder.html[PercolateQueryBuilder] |
|
||||
| {ref}/query-dsl-wrapper-query.html[Wrapper] | {query-ref}/WrapperQueryBuilder.html[WrapperQueryBuilder] | {query-ref}/QueryBuilders.html#wrapperQuery-java.lang.String-[QueryBuilders.wrapperQuery()]
|
||||
| {ref}/query-dsl-rank-feature-query.html[Rank Feature] | {mapper-extras-ref}/RankFeatureQuery.html[RankFeatureQueryBuilder] |
|
||||
|======
|
||||
|
||||
==== Span queries
|
||||
|
|
|
@ -224,7 +224,7 @@ Once the `RestClient` has been created, requests can be sent by calling either
|
|||
will block the calling thread and return the `Response` when the request is
|
||||
successful or throw an exception if it fails. `performRequestAsync` is
|
||||
asynchronous and accepts a `ResponseListener` argument that it calls with a
|
||||
`Response` when the request is successful or with an `Exception` if it4 fails.
|
||||
`Response` when the request is successful or with an `Exception` if it fails.
|
||||
|
||||
This is synchronous:
|
||||
|
||||
|
@ -329,6 +329,22 @@ include-tagged::{doc-tests}/RestClientDocumentation.java[rest-client-async-examp
|
|||
<2> Handle the returned exception, due to communication error or a response
|
||||
with status code that indicates an error
|
||||
|
||||
==== Cancelling asynchronous requests
|
||||
|
||||
The `performRequestAsync` method returns a `Cancellable` that exposes a single
|
||||
public method called `cancel`. Such method can be called to cancel the on-going
|
||||
request. Cancelling a request will result in aborting the http request through
|
||||
the underlying http client. On the server side, this does not automatically
|
||||
translate to the execution of that request being cancelled, which needs to be
|
||||
specifically implemented in the API itself.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests}/RestClientDocumentation.java[rest-client-async-cancel]
|
||||
--------------------------------------------------
|
||||
<1> Process the returned response, in case it was ready before the request got cancelled
|
||||
<2> Handle the returned exception, which will most likely be a `CancellationException` as the request got cancelled
|
||||
|
||||
[[java-rest-low-usage-responses]]
|
||||
=== Reading responses
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue