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

[FEATURE] Make raw JSON REST requests to OpenSearch #403

Closed
Tracked by #62
dblock opened this issue Oct 16, 2023 · 5 comments · Fixed by #447
Closed
Tracked by #62

[FEATURE] Make raw JSON REST requests to OpenSearch #403

dblock opened this issue Oct 16, 2023 · 5 comments · Fixed by #447
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dblock
Copy link
Member

dblock commented Oct 16, 2023

Is your feature request related to a problem?

Coming from opensearch-project/opensearch-clients#62, add support for making raw JSON requests.

What solution would you like?

  1. If an existing mechanism exists, document it similar to Added a guide on making raw JSON REST requests. opensearch-py#542.
  2. Add a high level DSL, e.g. client.get and client.post.
@Xtansia
Copy link
Collaborator

Xtansia commented Oct 16, 2023

This exists in the low-level OpenSearch.Net client, but there's no high-level DSL wrapper. Example of its use can be seen here: #220 (comment)

@Xtansia Xtansia removed the untriaged label Oct 16, 2023
@dblock
Copy link
Member Author

dblock commented Oct 16, 2023

await client.LowLevel.DoRequestAsync<VoidResponse>(
            HttpMethod.DELETE,
            "_search/point_in_time",
            CancellationToken.None,
            PostData.Serializable(new
            {
                pit_id = pitId
            }));

Nice. Documenting it would be a great start!

@Xtansia Xtansia added the good first issue Good for newcomers label Oct 16, 2023
@Djcarrillo6
Copy link
Contributor

Hi @Xtansia, I'd like to request assignment on this issue

@dblock
Copy link
Member Author

dblock commented Nov 13, 2023

Does it make sense to alias LowLevel to HTTP or http?

#406 (comment)

@Xtansia
Copy link
Collaborator

Xtansia commented Nov 13, 2023

Does it make sense to alias LowLevel to HTTP or http?

#406 (comment)

A direct alias of LowLevel doesn't make much sense as it points to an instance of the full low-level client, meaning you'd get client.Http.Indices.PutTemplate.

I have some ideas for a high-level DSL for the http methods, that I'm going to look into feasibility for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants