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] Unable to index documents in Amazon OpenSearch Serverless collection index with a custom ID #792

Closed
goelsunny87 opened this issue Aug 13, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@goelsunny87
Copy link

What is the bug?

We're unable to index the documents in Amazon OpenSearch Serverless collection with a custom ID using opensearch-py client. We do see the following error in Cloud Watch logs.

RequestError(400, 'illegal_argument_exception', 'Document ID is not supported in create/index operation request')

How can one reproduce the bug?

Create a simple python based application to index documents into Amazon OpenSearch Serverless collection. Please ensure that you leverage opensearch-py==2.6.0 in the requirements.txt file

What is the expected behavior?

Expected behavior is to be able to index documents in Amazon OpenSearch Serverless collection with a custom ID using opensearch-py client.

@goelsunny87 goelsunny87 added bug Something isn't working untriaged Need triage labels Aug 13, 2024
@dblock
Copy link
Member

dblock commented Aug 13, 2024

Post a repro please? But either way I would first narrow this down to a python client problem and not a serverless limitation or something else.

  1. Can you reproduce this with curl?
  2. Does this happen against a local installation of OpenSearch.
  3. Does this happen against Amazon Managed OpenSearch vs. Serverless.

@dblock dblock removed the untriaged Need triage label Aug 13, 2024
@goelsunny87
Copy link
Author

@dblock - I haven't tried this with local installation of OpenSearch. It's presently happening with Amazon managed OpenSearch Serverless collection.

@dblock
Copy link
Member

dblock commented Aug 13, 2024

@goelsunny87 Understood, please see above for what to do next.

@dblock
Copy link
Member

dblock commented Aug 13, 2024

Most likely this is expected behavior depending on the collection type https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-overview.html#serverless-usecase - For time series and vector search collections, you can't index by custom document ID or update by upsert requests. This operation is reserved for search use cases. You can update by document ID instead.

Going to close this for now as this isn't a bug in the python client.

@dblock dblock closed this as completed Aug 13, 2024
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