-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Add doc section about range query for range type #35222
Conversation
Pinging @elastic/es-search-aggs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great addition! I left some wording suggestions because when I didn't understand at first. I'm not 100% convinced they are better. What do you think?
==== Querying range fields | ||
|
||
`range` queries can be used on fields of type <<range,`range`>>, allowing to match a range specified in the query | ||
with a range field value in the document. Parameter `relation` controls how these two ranges are matched: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "The relation
parameter" here?
[horizontal] | ||
`WITHIN`:: | ||
|
||
Matches the document when document's range field is within the range specified in the query. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about "Matches documents who's range field is entirely within the query's range"?
|
||
`CONTAINS`:: | ||
|
||
Matches the document when document's range field contains the range specified in the query. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about "Matches documents who's range field entirely contains the query's range."?
|
||
`INTERSECTS`:: | ||
|
||
Matches the document when document's range field intersects with the range specified in the query. This is the default value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about "Matches documents who's range field intersects the query's range"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, could you wrap this around 80 columns? We're not particularly consistent with the docs, but we're trying.
Hi @nik9000, I included your proposed changes. I also changed "This is the default value when querying range fields." for clarification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
@gskema, I've stuck this in my "to merge" queue. I have to step out but will try to get to it "soon". Which might be in ~20 hours or so. Or, if any other maintainer wants to merge it, I'm cool with that. They just have to backport it and keep an eye on the build just in case. |
@nik9000 np! This is a doc fix so there's no hurry. I just hope it's ok that this PR is not against master? |
Our policy is to develop against master but docs fixes end up coming from
other branches because folks clikc the edit button. I'm quite happy to
merge it and drag it forward so long as it targets a modern branch. I
suspect others are more strict.
…On Mon, Nov 5, 2018, 17:32 Gytis Šk. ***@***.*** wrote:
@nik9000 <https://github.com/nik9000> np! This is a doc fix so there's no
hurry. I just hope it's ok that this PR is not against master?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35222 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AANLok_vSW-5xtbcewh7w1YKBF20Jy9xks5usLyAgaJpZM4YMXlx>
.
|
This makes their interaction more discoverable.
This makes their interaction more discoverable.
I've merged and forward ported. Thanks @gskema! |
This makes their interaction more discoverable.
…-agg * master: (528 commits) Register Azure max_retries setting (elastic#35286) add version 6.4.4 [Docs] Add painless context details for bucket_script (elastic#35142) Upgrade jline to 3.8.2 (elastic#35288) SQL: new SQL CLI logo (elastic#35261) Logger: Merge ESLoggerFactory into Loggers (elastic#35146) Docs: Add section about range query for range type (elastic#35222) [ILM] change remove-policy-from-index http method from DELETE to POST (elastic#35268) [CCR] Forgot missing return statement, SQL: Fix null handling for AND and OR in SELECT (elastic#35277) [TEST] Mute ChangePolicyForIndexIT#testChangePolicyForIndex Serialize ignore_throttled also to 6.6 after backport Check for java 11 in buildSrc (elastic#35260) [TEST] increase await timeout in RemoteClusterConnectionTests Add missing up-to-date configuration (elastic#35255) Adapt Lucene BWC version SQL: Introduce Coalesce function (elastic#35253) Upgrade to lucene-8.0.0-snapshot-31d7dfe6b1 (elastic#35224) Fix failing ICU tests (elastic#35207) Prevent throttled indices to be searched through wildcards by default (elastic#34354) ...
I didn't know about this mapping type until I saw it in an ES presentation. It's only described in the Mapping section. It should also be referenced in the Range Query documentation.