mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-18 19:05:06 +00:00
Added simplified range syntax to query string docs
This commit is contained in:
parent
47969efae9
commit
356de95840
@ -151,9 +151,34 @@ curly brackets `{min TO max}`.
|
|||||||
|
|
||||||
date:{* TO 2012/01/01}
|
date:{* TO 2012/01/01}
|
||||||
|
|
||||||
|
Curly and square brackets can be combined:
|
||||||
|
|
||||||
|
* Numbers from 1 up to but not including 5
|
||||||
|
|
||||||
|
count:[1..5}
|
||||||
|
|
||||||
|
|
||||||
|
Ranges with one side unbounded can use the following syntax:
|
||||||
|
|
||||||
|
age:>10
|
||||||
|
age:>=10
|
||||||
|
age:<10
|
||||||
|
age:<=10
|
||||||
|
|
||||||
|
[NOTE]
|
||||||
|
===================================================================
|
||||||
|
To combine an upper and lower bound with the simplified syntax, you
|
||||||
|
would need to join two clauses with an `AND` operator:
|
||||||
|
|
||||||
|
age:(>=10 AND < 20)
|
||||||
|
age:(+>=10 +<20)
|
||||||
|
|
||||||
|
===================================================================
|
||||||
|
|
||||||
The parsing of ranges in query strings can be complex and error prone. It is
|
The parsing of ranges in query strings can be complex and error prone. It is
|
||||||
much more reliable to use an explicit <<query-dsl-range-filter,`range` filter>>.
|
much more reliable to use an explicit <<query-dsl-range-filter,`range` filter>>.
|
||||||
|
|
||||||
|
|
||||||
===== Boosting
|
===== Boosting
|
||||||
|
|
||||||
Use the _boost_ operator `^` to make one term more relevant than another.
|
Use the _boost_ operator `^` to make one term more relevant than another.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user