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] Bulk operation throwing 'action_request_validation_exception" when doing bulk delete. #873

Open
ausmanlumeris opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ausmanlumeris
Copy link

What is the bug?

When using helpers.bulk to delete objects in bulk, the helpers.bulk function throws the exception shown below. I noticed there are no examples of doing a delete in the documentation.

raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
opensearchpy.exceptions.RequestError: RequestError(400, 'action_request_validation_exception', 'Validation Failed: 1: index is missing;')

How can one reproduce the bug?

Use this code.

docs = [{"delete": {"_index": "<index name", "_id": "<id>"}}]           
helpers.bulk(client, docs)

What is the expected behavior?

The bulk function should be able to delete objects in bulk. The same request works fine from postman when going directly against the opensearch '_bulk' API.

What is your host/environment?

OS: MacOS 14.7.1 (23H222)
Python 3.12.3
opensearch-py: 2.8.0

@ausmanlumeris ausmanlumeris added bug Something isn't working untriaged Need triage labels Dec 19, 2024
@dblock dblock removed the untriaged Need triage label Dec 19, 2024
@dblock
Copy link
Member

dblock commented Dec 19, 2024

Looks like a bug. Want to try and write a (failing) test for this @ausmanlumeris?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants