Skip to content
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

[BUG] High Level Rest Client Docs #579

Open
SaranSundar opened this issue Jul 12, 2023 · 4 comments
Open

[BUG] High Level Rest Client Docs #579

SaranSundar opened this issue Jul 12, 2023 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@SaranSundar
Copy link

SaranSundar commented Jul 12, 2023

What is the bug?

The docs say
The OpenSearch Java high-level REST client lets you interact with your OpenSearch clusters and indexes through Java methods and data structures rather than HTTP methods and JSON.

But isn't the point of the rest client to use http methods with json?

Also i'm confused on this warning

The OpenSearch Java high-level REST client will be deprecated starting with OpenSearch version 3.0.0 and will be removed in a future release. We recommend switching to the [Java client](https://opensearch.org/docs/2.8/clients/java/) instead.

Does the java client have a way to make rest calls where you can pass in json, or is the ability to make rest calls to opensearch blocked after v3?

Will there still be a low level rest client exposed somewhere something similar to https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-usage-initialization.html ?

@SaranSundar SaranSundar added bug Something isn't working untriaged labels Jul 12, 2023
@wbeckler
Copy link

There is an open issue to allow for more generic requests, and json would work there: #377

@wbeckler
Copy link

Also, someone just reopened this: #525

@wbeckler
Copy link

Between these two approaches (generic requester vs json-to-object), which would be more useful to your use case? It would be great if you could comment on one or the other of those issues to add weight to the proposals.

@SaranSundar
Copy link
Author

SaranSundar commented Jul 13, 2023

Yah similar to mentioned in that

my teams normal workflow would be use kibana to create some query that could combine multiple filters aggregations etc

and then we have custom java code that allows for easily constructing that same json input

essentially we can either send the raw json or create the json request through code to any opensearch endpoint such as /search or even something like

POST /_sql?format=txt
{
"query": "SELECT * FROM schoollist WHERE start_date < '2000-01-01'"
}

essentially the current high level rest client allows for being able to make any request that we can construct in kibana which is very useful.

I would like for whatever future library to give the same level of access to go from request in kibana to request in app with just the endpoint and json. Anything I can do in kibana i should be able to do by making the same request in my app.

@wbeckler wbeckler added the good first issue Good for newcomers label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants