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

SearchScrollRequest to implement ToXContentObject #24906

Merged

Conversation

javanna
Copy link
Member

@javanna javanna commented May 26, 2017

SearchScrollRequest can be created from a request body, but it doesn't support the opposite, meaning printing out its content to an XContentBuilder. This is useful to the high level REST client and allows for better testing of what we parse.

Moved parsing method from RestSearchScrollAction to SearchScrollRequest so that fromXContent and toXContent sit close to each other. Added unit tests to verify that body parameters override query_string parameters when both present (there is already a yaml test for this but unit test is even better)

Relates to #3889

SearchScrollRequest can be created from a request body, but it doesn't support the opposite, meaning printing out its content to an XContentBuilder. This is useful to the high level REST client and allows for better testing of what we parse.

Moved parsing method from RestSearchScrollAction to SearchScrollRequest so that fromXContent and toXContent sit close to each other. Added unit tests to verify that body parameters override query_string parameters when both present (there is already a yaml test for this but unit test is even better)

Relates to elastic#3889
@javanna javanna merged commit 7be5758 into elastic:master May 29, 2017
javanna added a commit that referenced this pull request May 29, 2017
SearchScrollRequest can be created from a request body, but it doesn't support the opposite, meaning printing out its content to an XContentBuilder. This is useful to the high level REST client and allows for better testing of what we parse.

Moved parsing method from RestSearchScrollAction to SearchScrollRequest so that fromXContent and toXContent sit close to each other. Added unit tests to verify that body parameters override query_string parameters when both present (there is already a yaml test for this but unit test is even better)
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request May 29, 2017
* master:
  Add a second refresh to concurrent relocation test
  Add a dummy_index to upgrade tests to ensure we recover fine with replicas (elastic#24937)
  Rework bwc snapshot projects to build up to two bwc versions (elastic#24870)
  Move the IndexDeletionPolicy to be engine internal (elastic#24930)
  [Tests] Harden InternalExtendedStatsTests (elastic#24934)
  TCorrecting api name (elastic#24924)
  Add search method to high level REST client (elastic#24796)
  Add fromXContent method to ClearScrollResponse (elastic#24909)
  ClearScrollRequest to implement ToXContentObject (elastic#24907)
  SearchScrollRequest to implement ToXContentObject (elastic#24906)
  Fix bug in weight computation for query cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants