-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Description:
The ElasticsearchStore class within the langchain_elasticsearch package currently lacks an implementation for the get_by_ids method. Attempting to use this method results in a NotImplementedError.
Error Details:
When calling get_by_ids with a list of IDs, such as ["1"], the following error is raised:
NotImplementedError: ElasticsearchStore does not yet support get_by_ids.
Steps to Reproduce:
-
Create an instance of
ElasticsearchStorewith the necessary parameters:from langchain_elasticsearch import ElasticsearchStore from langchain_openai import OpenAIEmbeddings store = ElasticsearchStore("test", embedding=OpenAIEmbeddings(), es_url="http://localhost:9200")
-
Attempt to retrieve documents by using their IDs:
store.get_by_ids(["1"])
-
Observe the
NotImplementedErrorthat indicates the method is not currently supported.
Expected Behavior:
The get_by_ids method should allow retrieval of documents from the ElasticsearchStore using their unique IDs without raising an error.
Actual Behavior:
A NotImplementedError is raised, indicating that the method is not supported.
Request for Enhancement:
Please implement the get_by_ids method in the ElasticsearchStore class to allow for the retrieval of documents by their IDs.
Thank you for your assistance!