-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[DOCS] Relocate search API's request body parameters #56304
[DOCS] Relocate search API's request body parameters #56304
Conversation
Changes: * Moves the document request body parameters for the search API from the Request body search page to the Search API reference page. * Relocates a search request body example from the Request body search page to the Search API reference page. * Adds a note to any duplicated query and request body parameters.
Pinging @elastic/es-search (:Search/Search) |
Pinging @elastic/es-docs (>docs) |
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 the reorganization, only left a couple of comments where some information might have been dropped on the move and a few questions around parameters that should maybe go to the "body" section rather than the "parameters". The list of whats allowed in parameters vs. body might need to be rechecked at some point, but that can probably be done in a follow up.
`ccs_minimize_roundtrips`:: | ||
(Optional, boolean) If `true`, the network round-trips between the | ||
coordinating node and the remote clusters ewill be minimized when executing | ||
{ccs} requests. See <<ccs-network-delays>>. Defaults to `true`. |
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.
On the pages this is moved to, cross-cluster search ({ccs}) as a term isn't mentioned explicitly and the link to the network delays is missing. I don't know if this was left out on purpose to simplify things, but at least spelling out the abreviation might be a good addition.
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 catching this. I agree this is the better definition and moved it over with 013cca6. As a note: {ccs}
expands to cross-cluster search
, not CCS
, so the full wording renders in the final HTML.
|
||
`request_cache`:: | ||
(Optional, boolean) If `true`, the caching of search results is enabled for | ||
requests where `size` is `0`. See <<shard-request-cache>>. |
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.
is enabled for requests where
size
is0
I don't know if this is useful information, seems to be missing from the target page
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.
Another good catch. Moved over with 013cca6.
|
||
|
||
Out of the above, the `search_type`, `request_cache` and the | ||
`allow_partial_search_results` settings must be passed as query-string |
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.
does this in reverse mean the batched_reduce_size
and ccs_minimize_roundtrips
should also go to the "body" section on the target page? Currently they seem to be only listed under Query Parameters. I don't know if they are allowed in both places tbh but we can check...
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 tested this by running off the master
branch and it appears that neither batched_reduce_size
nor ccs_minimize_roundtrips
are valid request body parameters. Both work fine as query parameters though.
Setup
PUT /my_index/_doc/0
{
"user": "kimchy"
}
ccs_minimize_roundtrips
GET /my_index/_search
{
"ccs_minimize_roundtrips": false,
"query" : {
"term" : { "user" : "kimchy" }
}
}
Response:
{
"error" : {
"root_cause" : [
{
"type" : "parsing_exception",
"reason" : "Unknown key for a VALUE_BOOLEAN in [ccs_minimize_roundtrips].",
"line" : 3,
"col" : 32
}
],
"type" : "parsing_exception",
"reason" : "Unknown key for a VALUE_BOOLEAN in [ccs_minimize_roundtrips].",
"line" : 3,
"col" : 32
},
"status" : 400
}
batched_reduce_size
GET /my_index/_search
{
"batched_reduce_size": 512,
"query" : {
"term" : { "user" : "kimchy" }
}
}
Response:
{
"error" : {
"root_cause" : [
{
"type" : "parsing_exception",
"reason" : "Unknown key for a VALUE_NUMBER in [batched_reduce_size].",
"line" : 3,
"col" : 28
}
],
"type" : "parsing_exception",
"reason" : "Unknown key for a VALUE_NUMBER in [batched_reduce_size].",
"line" : 3,
"col" : 28
},
"status" : 400
}
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 checking.
Thanks for taking a look @cbuescher. I made some adjustments based on your feedback. |
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 update, LGTM
Thanks @cbuescher |
Changes: * Moves the document request body parameters for the search API from the Request body search page to the Search API reference page. * Relocates a search request body example from the Request body search page to the Search API reference page. * Adds a note to any duplicated query and request body parameters.
Changes: * Moves the document request body parameters for the search API from the Request body search page to the Search API reference page. * Relocates a search request body example from the Request body search page to the Search API reference page. * Adds a note to any duplicated query and request body parameters.
Changes: * Moves the document request body parameters for the search API from the Request body search page to the Search API reference page. * Relocates a search request body example from the Request body search page to the Search API reference page. * Adds a note to any duplicated query and request body parameters.
Changes: * Moves the document request body parameters for the search API from the Request body search page to the Search API reference page. * Relocates a search request body example from the Request body search page to the Search API reference page. * Adds a note to any duplicated query and request body parameters.
Changes:
Moves the request body parameters for the search API
from the Request body search page to the Search API reference page.
Relocates a search request body example from the Request body search
page to the Search API reference page.
Adds a note to any duplicated query and request body parameters.