Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] add docs for async search #53675

Merged
merged 11 commits into from
Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,7 @@ class RestTestsFromSnippetsTask extends SnippetsTask {
if (path == null) {
path = '' // Catch requests to the root...
} else {
// Escape some characters that are also escaped by sense
path = path.replace('<', '%3C').replace('>', '%3E')
path = path.replace('{', '%7B').replace('}', '%7D')
path = path.replace('|', '%7C')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping this would work but it does cause problems. I need to see if this escaping is needed, to my mind it isn't but I may be wrong. In that case I need to only escape unless curly brackets are part of an expression like ${expression}, which I don't look forward to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turns out this is easy to address, there were only a couple of tests where we were using unescaped | which we can manually escape instead.

}
current.println(" - do:")
if (catchPart != null) {
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/api-conventions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ GET /%3Clogstash-%7Bnow%2Fd%7D%3E/_search
}
----------------------------------------------------------------------
// TEST[s/^/PUT logstash-2016.09.20\n/]
// TEST[s/now/2016.09.20||/]
// TEST[s/now/2016.09.20%7C%7C/]

[NOTE]
.Percent encoding of date math characters
Expand Down Expand Up @@ -141,7 +141,7 @@ GET /%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogs
}
----------------------------------------------------------------------
// TEST[s/^/PUT logstash-2016.09.20\nPUT logstash-2016.09.19\nPUT logstash-2016.09.18\n/]
// TEST[s/now/2016.09.20||/]
// TEST[s/now/2016.09.20%7C%7C/]

[[common-options]]
=== Common options
Expand Down Expand Up @@ -367,7 +367,7 @@ GET /_search?filter_path=hits.hits._source&_source=title&sort=rating:desc
[float]
==== Flat Settings

The `flat_settings` flag affects rendering of the lists of settings. When the
The `flat_settings` flag affects rendering of the lists of settings. When the
`flat_settings` flag is `true`, settings are returned in a flat format:

[source,console]
Expand Down
22 changes: 22 additions & 0 deletions docs/reference/async-search.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[role="xpack"]
[testenv="basic"]
[[async-search-intro]]
== Long-running searches

{es} generally allows you to quickly search across big amounts of data. There are
situations where a search executes on many many shards, possibly against
<<frozen-indices,frozen indices>> and spanning multiple
<<modules-remote-clusters,remote clusters>>, for which
results are not expected to be returned in milliseconds. When you need to
execute long-running searches, synchronously
waiting for its results to be returned is not ideal. Instead, Async search lets
you submit a search request that gets executed _asynchronously_,
monitor the progress of the request, and retrieve results at a later stage.
You can also retrieve partial results as they become available but
before the search has completed.

You can submit an async search request using the <<submit-async-search,submit
async search>> API. The <<get-async-search,get async search>> API allows you to
monitor the progress of an async search request and retrieve its results. An
ongoing async search can be deleted through the <<delete-async-search,delete
async search>> API.
2 changes: 2 additions & 0 deletions docs/reference/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ include::query-dsl.asciidoc[]

include::modules/cross-cluster-search.asciidoc[]

include::async-search.asciidoc[]

include::scripting.asciidoc[]

include::mapping.asciidoc[]
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/indices/rollover-index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ POST /logs_write/_rollover <2>
}
}
--------------------------------------------------
// TEST[s/now/2016.10.31||/]
// TEST[s/now/2016.10.31%7C%7C/]

<1> Creates an index named with today's date (e.g.) `logs-2016.10.31-1`
<2> Rolls over to a new index with today's date, e.g. `logs-2016.10.31-000002` if run immediately, or `logs-2016.11.01-000002` if run after 24 hours
Expand Down Expand Up @@ -339,7 +339,7 @@ over indices created in the last three days, you could do the following:
GET /%3Clogs-%7Bnow%2Fd%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-1d%7D-*%3E%2C%3Clogs-%7Bnow%2Fd-2d%7D-*%3E/_search
--------------------------------------------------
// TEST[continued]
// TEST[s/now/2016.10.31||/]
// TEST[s/now/2016.10.31%7C%7C/]


[[rollover-index-api-dry-run-ex]]
Expand Down
27 changes: 11 additions & 16 deletions docs/reference/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ See <<native-realm-configuration>>.
[role="exclude",id="native-settings"]
==== Native realm settings

See <<ref-native-settings>>.
See <<ref-native-settings>>.

[role="exclude",id="configuring-saml-realm"]
=== Configuring a SAML realm
Expand All @@ -130,27 +130,27 @@ See <<saml-guide>>.
[role="exclude",id="saml-settings"]
==== SAML realm settings

See <<ref-saml-settings>>.
See <<ref-saml-settings>>.

[role="exclude",id="_saml_realm_signing_settings"]
==== SAML realm signing settings

See <<ref-saml-signing-settings>>.
See <<ref-saml-signing-settings>>.

[role="exclude",id="_saml_realm_encryption_settings"]
==== SAML realm encryption settings

See <<ref-saml-encryption-settings>>.
See <<ref-saml-encryption-settings>>.

[role="exclude",id="_saml_realm_ssl_settings"]
==== SAML realm SSL settings

See <<ref-saml-ssl-settings>>.
See <<ref-saml-ssl-settings>>.

[role="exclude",id="configuring-file-realm"]
=== Configuring a file realm

See <<file-realm-configuration>>.
See <<file-realm-configuration>>.

[role="exclude",id="ldap-user-search"]
=== User search mode and user DN templates mode
Expand All @@ -170,7 +170,7 @@ See <<ref-ldap-settings>>.
[role="exclude",id="ldap-ssl"]
=== Setting up SSL between Elasticsearch and LDAP

See <<tls-ldap>>.
See <<tls-ldap>>.

[role="exclude",id="configuring-kerberos-realm"]
=== Configuring a Kerberos realm
Expand Down Expand Up @@ -211,7 +211,7 @@ See <<ref-ad-settings>>.
[role="exclude",id="mapping-roles-ad"]
=== Mapping Active Directory users and groups to roles

See <<ad-realm-configuration>>.
See <<ad-realm-configuration>>.

[role="exclude",id="how-security-works"]
=== How security works
Expand All @@ -237,9 +237,9 @@ See the details in

This page was deleted.
[[ml-datafeed-chunking-config]]
See the details in <<ml-put-datafeed>>, <<ml-update-datafeed>>,
See the details in <<ml-put-datafeed>>, <<ml-update-datafeed>>,
[[ml-datafeed-delayed-data-check-config]]
<<ml-get-datafeed>>,
<<ml-get-datafeed>>,
[[ml-datafeed-counts]]
<<ml-get-datafeed-stats>>.

Expand Down Expand Up @@ -323,7 +323,7 @@ See <<snapshots-register-repository>>.
[role="exclude",id="ml-dfa-analysis-objects"]
=== Analysis configuration objects

This page was deleted.
This page was deleted.
See <<put-dfanalytics>>.

[role="exclude",id="slm-api-delete"]
Expand Down Expand Up @@ -376,11 +376,6 @@ See <<slm-api-stop>>.

See <<ccs-gateway-seed-nodes>> and <<ccs-min-roundtrips>>.

[role="exclude",id="async-search"]
=== Asynchronous search

coming::[7.x]

[role="exclude",id="indices-component-templates"]
=== Component template APIs

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ high). This default value is `5`.

include::search/search.asciidoc[]

include::search/async-search.asciidoc[]

include::search/uri-request.asciidoc[]

include::search/request-body.asciidoc[]
Expand Down
Loading