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

Added Mongodb Atlas vector searcher #1624

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Added Mongodb Atlas vector searcher #1624

merged 1 commit into from
Jan 2, 2024

Conversation

kartik4949
Copy link
Contributor

Description

fix #1605

Related Issues

Checklist

  • Is this code covered by new or existing unit tests or integration tests?
  • Did you run make unit-testing and make integration-testing successfully?
  • Do new classes, functions, methods and parameters all have docstrings?
  • Were existing docstrings updated, if necessary?
  • Was external documentation updated, if necessary?

Additional Notes or Comments

@kartik4949 kartik4949 self-assigned this Dec 30, 2023
@@ -28,6 +29,7 @@
vector_searcher_implementations = {
'lance': LanceVectorSearcher,
'in_memory': InMemoryVectorSearcher,
'mongodb': MongoAtlasVectorSearcher,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"mongodb_atlas": ...


class BaseVectorSearcher(ABC):
def create_index(self, vi: 'VectorIndex', db: 'Datalayer'):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abstractmethod

Copy link
Collaborator

@blythed blythed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain the differences from this implementation and what was discussed here: #1605

print(json.dumps(index_definition, indent=2))
db.command(index_definition)

def create_index(self, vi: 'VectorIndex', db: 'Datalayer'):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function should be private and not called from outside.

In __init__ we need a check: "does this index exist". If not, then create.

See the description in the issue: #1605

@kartik4949 kartik4949 marked this pull request as draft December 31, 2023 14:53
@kartik4949 kartik4949 marked this pull request as ready for review January 1, 2024 20:13
Copy link
Collaborator

@blythed blythed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Just a few things to address, then let's GTM!

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (34830a7) 80.33% compared to head (1161b97) 80.27%.
Report is 1358 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1624      +/-   ##
==========================================
- Coverage   80.33%   80.27%   -0.07%     
==========================================
  Files          95      116      +21     
  Lines        6602     8218    +1616     
==========================================
+ Hits         5304     6597    +1293     
- Misses       1298     1621     +323     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kartik4949 kartik4949 merged commit fd0e9c4 into superduper-io:main Jan 2, 2024
2 checks passed
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.

[MISC] Move logic of self-hosted vector-search and vector-search into same framework.
4 participants