opensearch-project / opensearch-java

Java Client for OpenSearch
Apache License 2.0
106 stars 169 forks source link

[FEATURE] Search request params missing in Java client #1025

Open dzane17 opened 2 weeks ago

dzane17 commented 2 weeks ago

Is your feature request related to a problem?

Java client does not support some request parameters which were recently added in core such as search_pipeline, phase_took.

What solution would you like?

Crosscheck current params and add support for those missing.

What alternatives have you considered?

N/A

Do you have any additional context?

https://github.com/opensearch-project/OpenSearch/blob/ab7e914c3956ac206cf269ca345574882770a283/server/src/main/java/org/opensearch/rest/action/search/RestSearchAction.java#L150

dblock commented 2 weeks ago

FYI, we have recently merged a beginning of a code generator that aims to resolve this entire class of problems (https://github.com/opensearch-project/opensearch-java/pull/366). There are a few things you can do to help:

  1. Ensure that the specification for these APIs in https://github.com/opensearch-project/opensearch-api-specification is correct, and add tests for them in that repo.
  2. Write tests in this repo for the scenarios that are broken like the ones you're reporting and manually fix any of these bugs.

The combination will ensure that as we switch to the generator we're not introducing regressions.