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

[OpenSearch] Add chunks specific to an app_id if present #765

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

deshraj
Copy link
Collaborator

@deshraj deshraj commented Oct 4, 2023

Description

Noticed that currently Embedchain indexes all the document chunks to the same OpenSearch index which then causes issues if you are trying to use different app instances using opensearch. This leads to document getting deleted from the Opensearch index despite not wanting to touch that document since it was a part of a different embedchain app instantiation.

This PR fixes this issue. Updated the test to make sure it works fine.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit Test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@deshraj deshraj changed the title User/dyadav/fix opensearch doc add [OpenSearch] Add chunks specific to an app_id if present Oct 4, 2023
@deshraj deshraj requested a review from taranjeet October 4, 2023 22:43
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Files Coverage Δ
embedchain/chunkers/base_chunker.py 100.00% <100.00%> (ø)
embedchain/chunkers/images.py 100.00% <100.00%> (ø)
embedchain/embedchain.py 72.76% <50.00%> (-1.13%) ⬇️
embedchain/vectordb/opensearch.py 0.00% <0.00%> (ø)

📢 Thoughts on this report? Let us know!.

@deshraj deshraj merged commit 64a34ca into main Oct 4, 2023
3 of 5 checks passed
@deshraj deshraj deleted the user/dyadav/fix-opensearch-doc-add branch October 4, 2023 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant