[DOCS] Reformat distance feature query#44916
Merged
Conversation
62 tasks
Collaborator
|
Pinging @elastic/es-search |
Collaborator
|
Pinging @elastic/es-docs |
mayya-sharipova
approved these changes
Jul 26, 2019
Contributor
mayya-sharipova
left a comment
There was a problem hiding this comment.
thanks @jrodewig
| [[distance-feature-query-distance-ex]] | ||
| ====== Boost documents based on location | ||
| The following `bool` search returns documents with a `name` value of | ||
| `chocolate`.The search also uses the `distance_feature` query to increase the |
Contributor
There was a problem hiding this comment.
nit: space before "The"
Contributor
Author
There was a problem hiding this comment.
Thanks for catching this. Fixed with 6ff193d.
| Unlike the <<query-dsl-function-score-query,`function_score`>> query or other | ||
| ways to change <<query-filter-context, relevance scores>>, the | ||
| `distance_feature` query efficiently skips non-competitive hits when the | ||
| <<search-uri-request,`track_total_hits`>> parameter is `true`. No newline at end of file |
Contributor
There was a problem hiding this comment.
is NOT set to true
| a `number+date unit` ("1h", "10d",...) for date and date_nanos fields, | ||
| and a `number + geo unit` ("1km", "12m",...) for geo fields. | ||
| Boosts the <<query-filter-context, relevance score>> of documents closer to a | ||
| provided `origin` date or point. |
Contributor
There was a problem hiding this comment.
I think it is important to include some variation of the below paragraph, as to my mind it nicely highlights the main usage for this query:
"For example, use this query if you want to give more weight to documents with dates closer to a certain date, or to documents with locations closer to a certain location."
jrodewig
added a commit
that referenced
this pull request
Jul 29, 2019
jrodewig
added a commit
that referenced
this pull request
Jul 29, 2019
jrodewig
added a commit
that referenced
this pull request
Jul 29, 2019
jkakavas
pushed a commit
that referenced
this pull request
Jul 31, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the
distance_featurequery to use the new query format.This creates separate sections for the example requests, parameters, and notes.
This is part of #40977, an effort to standardize documentation for query types.