-
Notifications
You must be signed in to change notification settings - Fork 190
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
[FEATURE] Support plugins in client #1120
Comments
We are working on adding plugins via a new code generator (first parts in #1052) from spec (https://github.com/opensearch-project/opensearch-api-specification). If you would like to help, a good place to start is to contribute the missing specs via opensearch-project/opensearch-api-specification#235. There are some PRs in progress, e.g. opensearch-project/opensearch-api-specification#456. @Xtansia is working on the generator parts. |
Btw, you can use the generic client interface that should work for SQL, https://github.com/opensearch-project/opensearch-java/blob/main/guides/generic.md. |
Thanks @dblock for the information, I will try to help for missing specs. Just one question, When I use generic client to perform a SQL query search, I get the response Body in HitsMetadata format, is there a way to convert the Body to POJO, I checked the generic.md file as well, but the HitsMetadata class does not have _DESERIALIZER. Can you tell me if there's a way already available to convert below response in POJO or I need to write my own logic?
I tried below approach as mentioned in generic.md but the _DESERIALIZER is not present.
|
We have the issue regarding that: #540 |
@reta I am trying to run /plugins/_sql, which returns response in HitsMetadata format (I couldn't find any other class that matches the response of _sql API), the HitsMetadata does not have a _DESERIALIZER, so I can't do Bodies.json thing |
Correct, as per #540, the plugin specific clients are not yet available, so the _DESERIALIZER (or equivalents) need to be coded manually at the moment. |
@dsinghal-nice It looks more like it returns the equivalent of |
Thanks for the help !! Can you please help me with below questions as well ?
|
What is the bug?
OpenSearchClient is not having any way to use _plugins/_sql?format=json API.
How can one reproduce the bug?
POST _plugins/_sql?format=json
{
"query": "SELECT * FROM books_test WHERE year > 1950"
}
Trying to execute such SQL based query using OpenSearchClient, but there's no way to do it.
The text was updated successfully, but these errors were encountered: