Skip to content
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

Merged
merged 2 commits into from
May 7, 2020
Merged

[DOCS] Relocate search API's request body parameters #56304

merged 2 commits into from
May 7, 2020

Conversation

jrodewig
Copy link
Contributor

@jrodewig jrodewig commented May 6, 2020

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.

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.
@jrodewig jrodewig added :Search/Search Search-related issues that do not fall into other categories >docs General docs changes v7.7.1 v7.8.1 v7.9.0 v8.0.0 labels May 6, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label May 6, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@elasticmachine elasticmachine added the Team:Docs Meta label for docs team label May 6, 2020
@jrodewig jrodewig added the v7.6.3 label May 6, 2020
@jrodewig jrodewig mentioned this pull request May 6, 2020
28 tasks
Copy link
Member

@cbuescher cbuescher left a 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`.
Copy link
Member

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.

Copy link
Contributor Author

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>>.
Copy link
Member

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 is 0
I don't know if this is useful information, seems to be missing from the target page

Copy link
Contributor Author

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
Copy link
Member

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...

Copy link
Contributor Author

@jrodewig jrodewig May 7, 2020

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
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking.

@cbuescher cbuescher self-assigned this May 7, 2020
@jrodewig jrodewig requested a review from cbuescher May 7, 2020 12:51
@jrodewig
Copy link
Contributor Author

jrodewig commented May 7, 2020

Thanks for taking a look @cbuescher. I made some adjustments based on your feedback.

Copy link
Member

@cbuescher cbuescher left a 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

@jrodewig jrodewig merged commit b5f219c into elastic:master May 7, 2020
@jrodewig jrodewig deleted the docs__relocate-search-req-body-params branch May 7, 2020 13:50
@jrodewig
Copy link
Contributor Author

jrodewig commented May 7, 2020

Thanks @cbuescher

jrodewig added a commit that referenced this pull request May 7, 2020
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.
jrodewig added a commit that referenced this pull request May 7, 2020
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.
jrodewig added a commit that referenced this pull request May 7, 2020
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.
jrodewig added a commit that referenced this pull request May 7, 2020
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.
@jrodewig
Copy link
Contributor Author

jrodewig commented May 7, 2020

Backport commits

master b5f219c
7.x ea76b0c
7.8 276e86c
7.7 0f42122
7.6 bb381ea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories Team:Docs Meta label for docs team Team:Search Meta label for search team v7.6.3 v7.7.1 v7.8.1 v7.9.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants