Commit graph

631 commits

Author SHA1 Message Date
James Rodewig
2774cd6938
[DOCS] Swap [float] for [discrete] (#60124)
Changes instances of `[float]` in our docs for `[discrete]`.

Asciidoctor prefers the `[discrete]` tag for floating headings:
https://asciidoctor.org/docs/asciidoc-asciidoctor-diffs/#blocks
2020-07-23 11:48:22 -04:00
James Rodewig
80b674fb25
[DOCS] Reformat snippets to use two-space indents (#59973) 2020-07-21 12:24:26 -04:00
James Rodewig
8a57800f1b
[DOCS] Add performance warning for scripts (#59890) 2020-07-20 14:04:35 -04:00
James Rodewig
aa3ddfeefb
[DOCS] Move highlighting docs to separate page (#59768)
Moves the highlighting docs from the deprecated 'Request Body Search'
chapter to the new subpage of the 'Run a search chapter' section.

No substantive changes were made to the content.
2020-07-17 10:15:20 -04:00
homersimpsons
38aa0c18cd
[DOCS] MatchQuery: transpositions to fuzzy_transpositions (#59371) 2020-07-13 09:39:30 -04:00
James Rodewig
2be9db01c8
[DOCS] Replace datatype with data type (#58972) 2020-07-07 13:52:10 -04:00
István Zoltán Szabó
d1e480e5bd
[DOCS] Extends geo_shape query docs to explain behavior when data is indexed as array of shapes (#57806)
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2020-06-08 15:03:59 +02:00
Tal Levy
cfb36c3fcc
Update geo_point docs for geo_shape queries (#57487)
This commit highlights the ability for geo_point fields to be
used in geo_shape queries. It also adds an explicit geo_point
example in the geo_shape query documentation

Closes #56927.
2020-06-02 12:56:13 -07:00
Florian Kelbert
911c13bcf1
[DOCS] Fix typo in rank feature query docs (#57401) 2020-06-01 08:42:09 -04:00
Christoph Büscher
4e8134cfaf
Remove deprecated SimpleQueryStringBuilder parameters (#57200)
The `lowercase_expand_terms`, `locale` and `all_fields` parameters for
`simple_query_string` have been deprecated and a no-op for at least until 6.0
so we can remove them in 8.0
2020-05-28 16:36:32 +02:00
bellengao
e0191438ed
[Docs] Fix typo in match-bool-prefix-query doc (#56077) 2020-05-04 14:17:00 +02:00
James Rodewig
3791a92603
[DOCS] Warn about searching across all fields wt. query_string (#55853)
Warn about potential performance impact when a large number of fields
is used with query string query and no default field.

Re-adds content from #35570.
That content was erroneously removed in #45296.

Co-authored-by: Peter Dyson <peter.dyson@geekpete.com>
2020-04-28 09:19:24 -04:00
James Rodewig
4ec2424442
[DOCS] Add query reference docs template (#52292) 2020-04-10 08:46:47 -04:00
Ignacio Vera
6182db5b77
Add new point field. (#53804)
This commit adds a new point field that is able to index arbitrary pair of values (x/y)
 in the cartesian space. It only supports filtering using shape queries at the moment.
2020-04-07 13:08:02 +02:00
Christoph Büscher
440fb48869
[Docs] Correct date rounding example for range query (#51524)
Looking into #50237 I realized that two of the examples given in the
documentation around date math rounding for range queries on date fields using
`gt` and `lt` is slightly off by a nanosecond. This PR changes this to the
bounds that are currently parsed using these parameters.
2020-04-06 17:02:38 +02:00
Alan Woodward
0f7cf7b720
TermsLookup fields should be marked as Required in docs (#53784)
The terms-lookup section of our terms query docs currently state that the
index, id and path fields are optional. They should be marked instead
as required.
2020-03-20 15:38:43 +00:00
Dominic Page
d1cbdfb753
Geo shape query vs geo point (#52382)
Enable geo_shape query to work on geo_point fields for shapes: circle, polygon, multipolygon, rectangle

see: #48928

Co-Authored-By:  @iverase
2020-03-18 17:03:52 +01:00
Ralph Ursprung
2a44c29222
[Docs] Fix highlighting in match-query example (#52426) 2020-03-18 11:52:50 +01:00
Yash Joshi
f9cbc76908 [Docs] Fix typo in range query (#53656) 2020-03-18 10:18:37 +01:00
Adam Canady
83baca1bbc [Docs] Correct examples for * and + in regexp-syntax.asciidoc (#53210) 2020-03-06 17:19:37 +01:00
Mayya Sharipova
556ee9a719
Correct boost calculation in script_score query (#52478)
Before boost in script_score query was wrongly applied only to the subquery.
This commit makes sure that the boost is applied to the whole score
that comes out of script.

Closes #48465
2020-02-24 10:46:33 -05:00
Marios Trivyzas
a8b39ed842
Add a cluster setting to disallow expensive queries (#51385)
Add a new cluster setting `search.allow_expensive_queries` which by
default is `true`. If set to `false`, certain queries that have 
usually slow performance cannot be executed and an error message
is returned.

- Queries that need to do linear scans to identify matches:
  - Script queries
- Queries that have a high up-front cost:
  - Fuzzy queries
  - Regexp queries
  - Prefix queries (without index_prefixes enabled
  - Wildcard queries
  - Range queries on text and keyword fields
- Joining queries
  - HasParent queries
  - HasChild queries
  - ParentId queries
  - Nested queries
- Queries on deprecated 6.x geo shapes (using PrefixTree implementation)
- Queries that may have a high per-document cost:
  - Script score queries
  - Percolate queries

Closes: #29050
2020-02-12 18:06:04 +01:00
Mayya Sharipova
620996287a
Remove docs related to index time boosting (#51704)
As there is no really index time boosting,
as boost is only applied during query time,
this removes mentions of index time boosting.
2020-01-31 09:01:52 -05:00
Russ Cam
ff22445364 [Docs] Including leading slash in range query doc example URLs (#51277) 2020-01-22 09:38:52 +01:00
Tal Levy
6c86606d2a
Adds support for geo-bounds filtering in geogrid aggregations (#50002)
It is fairly common to filter the geo point candidates in
geohash_grid and geotile_grid aggregations according to some
viewable bounding box. This change introduces the option of
specifying this filter directly in the tiling aggregation.

This is even more relevant to `geo_shape` where the bounds will restrict
the shape to be within the bounds

this optional `bounds` parameter is parsed in an equivalent fashion to 
the bounds specified in the geo_bounding_box query.
2020-01-14 08:29:10 -08:00
James Rodewig
979bfa6691
[DOCS] Fix time_zone example in range query docs (#50830)
One of the example snippets in the range query docs was missing a
required 'T' in the `date` format. This adds the required 'T'.
2020-01-10 07:23:25 -06:00
James Rodewig
e090b9bcad
[DOCS] Fuzzy wildcard not supported in query_string (#50466)
The `query_string` does not support mixing wildcards with fuzziness.
This adds a related warning to the `query_string` docs.
2020-01-07 12:53:47 -06:00
Orhan Toy
0db416921c [DOCS] Fix missing quote in script-score-query.asciidoc (#50590) 2020-01-03 16:15:18 +01:00
Alan Woodward
32730cfdc5
Add fuzzy intervals source (#49762)
This intervals source will return terms that are similar to an input term, up to
an edit distance defined by fuzziness, similar to FuzzyQuery.

Closes #49595
2020-01-03 09:55:53 +00:00
James Rodewig
cfddddda0b
[DOCS] Fix search request body links (#50500)
PR #44238 changed several links related to the Elasticsearch search request body API. This updates several places still using outdated links or anchors.

This will ultimately let us remove some redirects related to those link changes.
2019-12-26 14:20:51 -05:00
Xiang Dai
432bd0e92c Fix docs typos (#50365)
Fixes a few typos in the docs.

Signed-off-by: Xiang Dai 764524258@qq.com
2019-12-23 10:35:14 -05:00
Christoph Büscher
7f90ff64a3
[Docs] Remove intervals filter rule from allowed top-level rules (#50320)
The `filter` rule is not allowed on the top-level of the query, so removing it
from the list of allowed rules. Where it can be nested inside other rules, those
rules already mention it.
2019-12-18 17:35:35 +01:00
Ignacio Vera
7c559be31c
"CONTAINS" support for BKD-backed geo_shape and shape fields (#50141)
Lucene 8.4 added support for "CONTAINS", therefore in this commit those
changes are integrated in Elasticsearch. This commit contains as well a
bug fix when querying with a geometry collection with "DISJOINT" relation.
2019-12-16 07:43:42 +01:00
Peter Johnson
263f5bd6b6 [Docs] Fix typo in function-score-query.asciidoc (#50030) 2019-12-10 17:33:36 +01:00
James Rodewig
4415f1a536
[DOCS] Correct inline shape snippets in shape query docs (#49921)
In the shape query docs, the index mapping snippet uses the "geometry"
shape field mapping. However, the doc index snippet uses the "location"
property.

This changes the "location" property to "geometry". It also adds a
comment containing the search result snippet. This should prevent
similar issues in the future.
2019-12-09 08:39:17 -05:00
James Rodewig
72dd49ddcc
[DOCS] Document minimum_should_match defaults for bool query (#48865)
Adds documentation for the `minimum_should_match` parameter to the `bool` query docs. Includes docs for the default values:

- `1` if the `bool` query includes at least one `should` clause and no `must` or `filter` clauses
- `0` otherwise
2019-12-04 12:44:13 -05:00
Christoph Büscher
0162662eb8
[Docs] Correct max_doc_freq default value (#49536)
The default is set to Integer.MAX_VALUE but is reported to be `0` in the docs.
With the current implementation a value of 0 would mean all terms are filtered
out, which is the opposite of "unbounded".

Closes #49520
2019-11-26 10:46:44 +01:00
James Rodewig
1e45db49ec
[DOCS] Document script_score float precision limit (#49402)
All document scores are positive 32-bit floating point numbers. However, this
wasn't previously documented.

This can result in surprising behavior, such as precision loss, for users when
customizing scores using the function score query.

This commit updates an existing admonition in the function score query docs to
document the 32-bits precision limit. It also updates the search API reference
docs to note that `_score` is a 32-bit float.
2019-11-21 08:53:56 -05:00
markharwood
29a13007e4 [DOCS] Add TermVectors API reference to MLT query docs (#37228)
Adds a reference the use of the TermVectors API following an issue raised about lack of flexibility in the MLT query: https://github.com/elastic/elasticsearch/issues/35509
2019-10-18 10:02:19 -04:00
Anton
88346ff8a5 [DOCS] Fix typo in intervals query docs (#48180) 2019-10-17 09:15:21 -04:00
David Woods
8142ac4d5e Add a note to query_string docs around spaces in field names. (#47326) 2019-10-16 13:25:48 -07:00
Alan Woodward
566e1b7d33
Remove type field from DocWriteRequest and associated Response objects (#47671)
This commit removes the type field from index, update and delete requests, and their
associated responses.

Relates to #41059
2019-10-11 10:23:55 +01:00
Ryan Ernst
d8b4556e2d
Add explanations to script score queries (#46693)
While function scores using scripts do allow explanations, they are only
creatable with an expert plugin. This commit improves the situation for
the newer script score query by adding the ability to set the
explanation from the script itself.

To set the explanation, a user would check for `explanation != null` to
indicate an explanation is needed, and then call
`explanation.set("some description")`.
2019-10-03 19:35:59 -07:00
James Rodewig
eb454558fb [DOCS] Correct snippet in query string syntax 2019-09-30 11:25:13 -04:00
Andrew Naguib
b4506019d5 [DOCS] Note double backslashes (\\) are required to escape JSON chars (#46863) 2019-09-30 11:19:50 -04:00
James Rodewig
07761530c1
[DOCS] Add multi-level nested query example to nested query docs (#46986) 2019-09-25 00:56:15 -04:00
Alan Woodward
c1f99e2d75
Remove _type from SearchHit (#46942)
This commit removes the `_type` field from all search hit responses.

Relates to #41059
2019-09-23 19:14:54 +01:00
rikardbakkehaug
212e3e4075 [DOCS] Correct date math ex for gt and gte parms in range query docs (#46873) 2019-09-19 16:38:42 -04:00
James Rodewig
5c78f606c2
[DOCS] Change // CONSOLE comments to [source,console] (#46440) 2019-09-09 10:45:37 -04:00
Suhel Khan
47478921ac [Docs] Fix typo in minimum-should-match.asciidoc (#46472) 2019-09-09 14:17:49 +02:00