Commit graph

34 commits

Author SHA1 Message Date
Luzia Kündig
49ccc6c275
Update range-query.asciidoc (#95822)
the example query for "date between today and yesterday" only returns documents from the day before if "lt" is used.
2023-05-05 11:15:40 +02:00
Christoph Büscher
c327794ae8
Fix range query on date fields for number inputs (#63692)
Currently, if you write a date range query with numeric 'to' or 'from' bounds,
they can be interpreted as years if no format is provided. We use
"strict_date_optional_time||epoch_millis" in this case that can interpret inputs
like 1000 as the year 1000 for example. 
This PR change this to always interpret and parse numbers with the "epoch_millis"
parser if no other formatter was provided.

Closes #63680
2020-12-01 18:49:50 +01:00
Przemyslaw Gomulka
b38eaae47f
[doc] Rounding range query rules (#63109)
a documentation explaining defaulting of missing fields when using date math parser.
relates #62268
2020-10-02 08:59:27 +02:00
James Rodewig
224ff408de
[DOCS] Fix range query admon for clarity (#62163) 2020-09-09 10:17:58 -04:00
James Rodewig
ea80a542a7
[DOCS] Fix typo in range query docs (#61722) 2020-08-31 10:46:06 -04:00
James Rodewig
a94e5cb7c4
[DOCS] Replace Wikipedia links with attribute (#61171) 2020-08-17 09:44:24 -04:00
James Rodewig
80b674fb25
[DOCS] Reformat snippets to use two-space indents (#59973) 2020-07-21 12:24:26 -04:00
James Rodewig
2be9db01c8
[DOCS] Replace datatype with data type (#58972) 2020-07-07 13:52:10 -04: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
Yash Joshi
f9cbc76908 [Docs] Fix typo in range query (#53656) 2020-03-18 10:18:37 +01: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
Russ Cam
ff22445364 [Docs] Including leading slash in range query doc example URLs (#51277) 2020-01-22 09:38:52 +01: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
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
James Rodewig
08ea6a79fb
[DOCS] Update relevance score cross-references (#45092) 2019-08-02 14:15:12 -04:00
James Rodewig
f167b2f909
[DOCS] Update parameter format (#44703) 2019-07-31 14:18:22 -04:00
James Rodewig
ec37a9cea0
[DOCS] Make Query DSL titles consistent (#43935) 2019-07-18 10:18:11 -04:00
James Rodewig
5f6321aacb
[DOCS] Rewrite range query (#43282) 2019-06-25 15:24:44 -04:00
Christoph Büscher
c9d05adedd
Clarify using time_zone and date math in range query (#40655)
Currently, the docs correctly state that using `now` in range queries will not
be affected by the `time_zone` parameter. However, using date math roundings
like e.g. `now\d` will be affected by the `time_zone`. Adding this example
because it seems to be a frequently asked question and source of confusion.

Relates to #40581
2019-03-29 23:38:37 +01:00
Gytis Šk
3ee37b425b Docs: Add section about range query for range type (#35222)
This makes their interaction more discoverable.
2018-11-06 10:49:12 -05:00
Christoph Büscher
3f78b3f5e1
[Docs] Explain incomplete dates in range queries (#30689)
The current documentation isn't very clear about how incomplete dates are
treated when specifying custom formats in a `range` query. This change adds a
note explaining how missing month or year coordinates translate to dates that
have the missings slots filled with unix time start date (1970-01-01)

Closes #30634
2018-05-24 11:20:00 +02:00
Isabel Drost-Fromm
4c02e97bcd Add back doc execution to query dsl.
Relates to #18211

This reverts commit 20aafb1196.
2016-05-24 12:43:41 +02:00
Isabel Drost-Fromm
20aafb1196 Revert "Add Autosense annotation for query dsl testing" 2016-05-17 20:55:56 +02:00
Isabel Drost-Fromm
ab4367c07e Add CONSOLE to span queries.
... and range, and terms...
2016-05-10 12:59:44 +02:00
Isabel Drost-Fromm
a865090cf3 CONSOLE is the new AUTOSENSE 2016-05-10 12:42:17 +02:00
Isabel Drost-Fromm
e486560ea8 Add Autosense annotation for query dsl testing
this adds the autosense annotation to a couple of query dsl
docs files and fixes the snippets to work in the tests along
the way.
2016-05-10 11:54:48 +02:00
Rafał Bigaj
ead431f524 Duplicated colon was removed (#17988)
Hope this help :-)
2016-04-26 20:31:00 +02:00
André Carvalho
070c836dce Gives more emphasys 2015-09-24 11:30:00 -03:00
André Carvalho
d90fc8f7fd Documents that now is not affected by time_zone in range queries 2015-09-23 22:00:49 -03:00
Clinton Gormley
ac2b8951c6 Docs: Mapping docs completely rewritten for 2.0 2015-08-06 17:24:51 +02:00
Ryan Ernst
dba42a83e2 Docs: Update time_zone specification
closes #12317
2015-07-21 00:22:53 -07:00
Clinton Gormley
171687d207 Docs: Reorganised the Query DSL docs into families and explaing query vs filter context 2015-06-04 01:59:37 +02:00
Adrien Grand
a0af88e996 Query DSL: Remove filter parsers.
This commit makes queries and filters parsed the same way using the
QueryParser abstraction. This allowed to remove duplicate code that we had
for similar queries/filters such as `range`, `prefix` or `term`.
2015-05-07 20:14:34 +02:00
Renamed from docs/reference/query-dsl/queries/range-query.asciidoc (Browse further)