-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[DOCS] Rewrite prefix
query docs
#41955
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
Conversation
Pinging @elastic/es-search |
@elasticmachine run elasticsearch-ci/docs-check |
@elasticmachine run elasticsearch-ci/docbldesx |
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.
Nice rewrite again, I left two small questions.
// CONSOLE | ||
|
||
A boost can also be associated with the query: | ||
[[prefix-query-top-level-params]] | ||
==== Top-level parameters for `term` |
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.
Should this be "prefix" instead of "term"?
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.
Good catch. Copy/paste error. Fixed with 1e6ca49.
"prefix": { | ||
"user": { | ||
"value": "ki", | ||
"rewrite": "constant_score" |
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'm wondering if this parameter should be included in the "default" example since IMHO its pretty much an advanced parameter and mentioned later (also, constant_score
should be the default, so not necessary here).
Did you consider also documenting the previous "short" form or do we want to discourage ppl. from using it?
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.
Great question!
I've been using the longer form requests because it's easier to delineate additional parameters. This is less of an issue with the prefix
query, but I used the longer form so it's consistent with other queries. However, I'm open to changing this if wanted.
I've removed the rewrite
parameter and added a "short request example" with 1e6ca49 and d58de59.
Thanks again for your review, @cbuescher. I've made a few changes in response to your feedback. Let me know if you have any other thoughts. |
It might be worth also referring to the |
Great suggestion @romseygeek. I've added a section for |
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.
Thanks for the changes, LGTM
Changes
prefix
queryboost
andrewrite
parameters in example requestThis is part of #40977, an effort to standardize documentation for query types.
Any and all feedback welcome!
Before
Before image
After
After image