opensearch-project / opensearch-project/opensearch-java
[FEATURE] Add search_pipeline support to opensearch-java
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
Is your feature request related to a problem?
I am unable to include a search_pipeline in my queries with the opensearch-java library:
error=Unknown field 'search_pipeline' for type 'org.opensearch.client.opensearch.core.SearchRequest$Builder'
What solution would you like?
It should be possible, in opensearch-java, to use a dynamic search pipeline similar to what would be configured in a REST call with:
},
"search_pipeline": {
"phase_results_processors": [{
"normalization-processor": {
"normalization": { "technique": "min_max" },
"combination": {
"technique": "arithmetic_mean",
"parameters": {
"weights": [ 0.9, 0.1 ]
}
}
}
}]
}
}
It seems as though this support needs to be added to https://github.com/opensearch-project/opensearch-java/blob/main/java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchRequest.java
What alternatives have you considered?
Our app could use the REST API, but we use opensearch-java for all other requests so we'd like to stay consistent.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with java-client/src/main/java/org/opensearch/client/opensearch/core/MsearchRequest.java and the org.opensearch.client.opensearch.core.SearchRequest.Builder referenced by the error. Compare the existing request model with the REST search_pipeline example and determine how dynamic phase-results processors should be represented. Done means callers can express this search pipeline through opensearch-java without falling back to the REST API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100