opensearch-project / opensearch-js

Node.js Client for OpenSearch
https://opensearch.org/docs/latest/clients/javascript/
Apache License 2.0
179 stars 118 forks source link

[FEATURE] Search Pipelines in opensearch-js #679

Closed sejli closed 3 months ago

sejli commented 6 months ago

Is your feature request related to a problem?

The search pipelines feature was released officially in 2.9. Example search with a pipeline:

POST /opensearch_sample_data_flights/_search?search_pipeline=my_pipeline
{
   "query": {
      "match_all:" {}
   }
}

The request in opensearch-js currently does not have a parameter for a search_pipeline.

What solution would you like?

Add a parameter for search_pipeline for search requests.

What alternatives have you considered?

Currently, adding a search_pipeline parameter works, but it is not declared in opensearch-js, and the linter throws errors.

Do you have any additional context?

N/A

nhtruong commented 6 months ago

Thanks @sejli I've raised an issue in the API Spec repo as eventually this will be handled by a client generator that will read the spec and generate the API code. We're currently working on the generator ourselves.

In the meantime, feel free to raise a PR to update the input type for the search operation if no one has gotten to it. If you have any questions, don't hesitate to ask :)

sumukhswamy commented 3 months ago

@nhtruong any update on this? The PR was closed recently.

nhtruong commented 3 months ago

It was probably closed by mistake. Just restored it. Lemme rebase it and get it merged.