From 36c373e6157b69a8a43c03606dd1c996b8354c36 Mon Sep 17 00:00:00 2001 From: javanna Date: Mon, 11 May 2015 12:58:12 +0200 Subject: [PATCH] [DOCS] documented missing query_string parameters for count, exists, search & validate_query relates to #11057 --- docs/reference/search/count.asciidoc | 17 +++++++++---- docs/reference/search/exists.asciidoc | 14 ++++++++--- docs/reference/search/uri-request.asciidoc | 15 +++++++----- docs/reference/search/validate.asciidoc | 28 ++++++++++++++++++++++ 4 files changed, 61 insertions(+), 13 deletions(-) diff --git a/docs/reference/search/count.asciidoc b/docs/reference/search/count.asciidoc index 258e3c94b40..2f4b5dc48f8 100644 --- a/docs/reference/search/count.asciidoc +++ b/docs/reference/search/count.asciidoc @@ -56,15 +56,24 @@ parameters that can be passed: [cols="<,<",options="header",] |======================================================================= |Name |Description -|df |The default field to use when no field prefix is defined within the +|`df` |The default field to use when no field prefix is defined within the query. -|analyzer |The analyzer name to be used when analyzing the query string. +|`analyzer` |The analyzer name to be used when analyzing the query string. -|default_operator |The default operator to be used, can be `AND` or +|`default_operator` |The default operator to be used, can be `AND` or `OR`. Defaults to `OR`. -|terminate_after |experimental[The API for this feature may change in the future] +|`lenient` |If set to true will cause format based failures (like +providing text to a numeric field) to be ignored. Defaults to false. + +|`lowercase_expanded_terms` |Should terms be automatically lowercased or +not. Defaults to `true`. + +|`analyze_wildcard` |Should wildcard and prefix queries be analyzed or +not. Defaults to `false`. + +|`terminate_after` |experimental[The API for this feature may change in the future] The maximum count for each shard, upon reaching which the query execution will terminate early. If set, the response will have a boolean field `terminated_early` to diff --git a/docs/reference/search/exists.asciidoc b/docs/reference/search/exists.asciidoc index e2d6a3c817e..9bbd40134ec 100644 --- a/docs/reference/search/exists.asciidoc +++ b/docs/reference/search/exists.asciidoc @@ -50,14 +50,22 @@ parameters that can be passed: [cols="<,<",options="header",] |======================================================================= |Name |Description -|df |The default field to use when no field prefix is defined within the +|`df` |The default field to use when no field prefix is defined within the query. -|analyzer |The analyzer name to be used when analyzing the query string. +|`analyzer` |The analyzer name to be used when analyzing the query string. -|default_operator |The default operator to be used, can be `AND` or +|`default_operator` |The default operator to be used, can be `AND` or `OR`. Defaults to `OR`. +|`lenient` |If set to true will cause format based failures (like +providing text to a numeric field) to be ignored. Defaults to false. + +|`lowercase_expanded_terms` |Should terms be automatically lowercased or +not. Defaults to `true`. + +|`analyze_wildcard` |Should wildcard and prefix queries be analyzed or +not. Defaults to `false`. |======================================================================= [float] diff --git a/docs/reference/search/uri-request.asciidoc b/docs/reference/search/uri-request.asciidoc index 7ed16336a94..9a3e2be1643 100644 --- a/docs/reference/search/uri-request.asciidoc +++ b/docs/reference/search/uri-request.asciidoc @@ -56,9 +56,18 @@ query. |`analyzer` |The analyzer name to be used when analyzing the query string. +|`lowercase_expanded_terms` |Should terms be automatically lowercased or +not. Defaults to `true`. + +|`analyze_wildcard` |Should wildcard and prefix queries be analyzed or +not. Defaults to `false`. + |`default_operator` |The default operator to be used, can be `AND` or `OR`. Defaults to `OR`. +|`lenient` |If set to true will cause format based failures (like +providing text to a numeric field) to be ignored. Defaults to false. + |`explain` |For each hit, contain an explanation of how scoring of the hits was computed. @@ -98,11 +107,5 @@ Defaults to no terminate_after. deprecated[2.0,Replaced by `size: 0`]. Defaults to `query_then_fetch`. See <> for more details on the different types of search that can be performed. - -|`lowercase_expanded_terms` |Should terms be automatically lowercased or -not. Defaults to `true`. - -|`analyze_wildcard` |Should wildcard and prefix queries be analyzed or -not. Defaults to `false`. |======================================================================= diff --git a/docs/reference/search/validate.asciidoc b/docs/reference/search/validate.asciidoc index 4bbe0a1ed57..3593f4682d1 100644 --- a/docs/reference/search/validate.asciidoc +++ b/docs/reference/search/validate.asciidoc @@ -21,6 +21,34 @@ curl -XGET 'http://localhost:9200/twitter/_validate/query?q=user:foo' {"valid":true,"_shards":{"total":1,"successful":1,"failed":0}} -------------------------------------------------- +[float] +=== Request Parameters + +When executing exists using the query parameter `q`, the query passed is +a query string using Lucene query parser. There are additional +parameters that can be passed: + +[cols="<,<",options="header",] +|======================================================================= +|Name |Description +|`df` |The default field to use when no field prefix is defined within the +query. + +|`analyzer` |The analyzer name to be used when analyzing the query string. + +|`default_operator` |The default operator to be used, can be `AND` or +`OR`. Defaults to `OR`. + +|`lenient` |If set to true will cause format based failures (like +providing text to a numeric field) to be ignored. Defaults to false. + +|`lowercase_expanded_terms` |Should terms be automatically lowercased or +not. Defaults to `true`. + +|`analyze_wildcard` |Should wildcard and prefix queries be analyzed or +not. Defaults to `false`. +|======================================================================= + Or, with a request body: [source,js]