Skip to content

Missing get_by_ids Implementation in ElasticsearchStore #49

@istvancsabakis

Description

@istvancsabakis

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:

  1. Create an instance of ElasticsearchStore with the necessary parameters:

    from langchain_elasticsearch import ElasticsearchStore 
    from langchain_openai import OpenAIEmbeddings
    
    store = ElasticsearchStore("test", embedding=OpenAIEmbeddings(), es_url="http://localhost:9200")
  2. Attempt to retrieve documents by using their IDs:

    store.get_by_ids(["1"])
  3. Observe the NotImplementedError that 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions