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] Add support to check if the index exists? #597

Closed
akshay-vishnoi opened this issue Aug 29, 2023 · 1 comment
Closed

[FEATURE] Add support to check if the index exists? #597

akshay-vishnoi opened this issue Aug 29, 2023 · 1 comment

Comments

@akshay-vishnoi
Copy link

Is your feature request related to a problem?

OpenSearch gives an option to check if the index exists by simply returning the status of either 200 or 404. But this package doesn't support this API yet.

What alternatives have you considered?

For now, I have to run the operation like deleting the index and catching the error index-not-found.

Or please let me know if the support already exists. Thanks

@nhtruong
Copy link
Collaborator

It does actually:

IndicesApi.prototype.exists = function indicesExistsApi(params, options, callback) {

client.indices.exists({ index: 'books'})
API actions related to manipulating indices can be found in the indices namespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants