Skip to content

Conversation

@inpink
Copy link
Contributor

@inpink inpink commented Sep 29, 2024

Bug description
When performing a similarity search with SearchRequest, the index name is not included.
This leads to a permission error when using roles restricted to specific indices in Opensearch.

Contents

  • Fixed the issue where the index name was missing in similaritySearch.
    The index was included for adding and deleting documents but not for search.
    I added it to ensure correct behavior.

Test

  • Added tests to verify documents are correctly added and retrieved.
  • Tested this with different indices using separate OpenSearchVectorStore instances.

Issue Link
close #885

@inpink inpink changed the title include index name in OpenSearchVectorStore for similarity search Include index name in OpenSearchVectorStore for similarity search Sep 29, 2024
- Resolved issue where index name was not being sent during similaritySearch.
- Updated similaritySearch method to include index in the SearchRequest.
- Implemented a test to verify that documents can be added and retrieved from two different indices using separate OpenSearchVectorStore instances. Ensured that similarity search results are correctly returned for the respective indices.
@markpollack
Copy link
Member

Thanks, much appreciated!! Merged in 5431bdd

@markpollack markpollack closed this Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opensearch similarity search should include index name

2 participants