Skip to content

[Feature Request] Allow setting query parameters on requests #13776

@oliverlockwood

Description

@oliverlockwood

Is your feature request related to a problem? Please describe

I am trying to migrate a complex project from Elasticsearch to OpenSearch. When using the RestHighLevelClient (which yes, I know is deprecated, but for various reasons, migrating away from that will be a separate follow-on piece of work!) I cannot filter out some big fields that aren't always required, which means that my search responses are much bigger than they could be; this adversely affects the performance of the application.

This problem is essentially the same as that described in #535.

Describe the solution you'd like

At a fundamental level, I'd like to be able to set a query parameter like ?filter_path=-hits.hits._source.somethingbig (as documented at https://opensearch.org/docs/2.3/opensearch/common-parameters/#filtered-responses.

I would be happy to implement this from scratch without inspecting the PR implementation of #536 which was closed due to the authors concerns about license infringement. To that end, I have deliberately not looked at that PR.

Related component

Clients

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientsClients within the Core repository such as High level Rest client and low level clientenhancementEnhancement or improvement to existing feature or requestv2.15.0Issues and PRs related to version 2.15.0v3.0.0Issues and PRs related to version 3.0.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions