Skip to content

Vector Indexes #14

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

Merged
merged 1 commit into from
Jul 9, 2025
Merged

Vector Indexes #14

merged 1 commit into from
Jul 9, 2025

Conversation

vgvoleg
Copy link
Collaborator

@vgvoleg vgvoleg commented Jun 6, 2025

No description provided.

@vgvoleg vgvoleg force-pushed the table_indexes branch 2 times, most recently from 2c3aa6f to 1405127 Compare June 6, 2025 17:21
@vgvoleg vgvoleg force-pushed the table_indexes branch 2 times, most recently from 934a8b1 to 53b111c Compare July 8, 2025 06:43
@vgvoleg vgvoleg force-pushed the table_indexes branch 3 times, most recently from ab3ab52 to 8260486 Compare July 8, 2025 15:10
@vgvoleg vgvoleg requested a review from Copilot July 9, 2025 07:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for creating and using a vector index in YDB vector stores, along with end-to-end tests for various search strategies and updated Docker configuration.

  • Add index_enabled, index_name, and index configuration parameters in YDBSettings and implement index creation/renaming logic.
  • Extend add_texts and search query preparation to leverage the vector index when enabled.
  • Add tests covering basic vector-indexed searches across different strategies and update Docker Compose for vector index feature flags.

Reviewed Changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

File Description
tests/test_vectorestore.py Added tests for indexed searches and a stray drop() call.
langchain_ydb/vectorstores.py Introduce index config in settings, query builders, and index maintenance.
docker/docker-compose.yml Bumped YDB image to trunk and enabled vector index feature flag.
Comments suppressed due to low confidence (3)

langchain_ydb/vectorstores.py:92

  • The class docstring still says the default table is 'langchain_store'. Update it to match the new default 'ydb_langchain_store'.
    table: str = "ydb_langchain_store"

langchain_ydb/vectorstores.py:73

  • The docstring default for index_name ('vectorsearch_index') does not match the code default ('ydb_vector_index'). Please update the docstring.
        index_name (str) : Name of vector index. Default is 'vectorsearch_index'.

tests/test_vectorestore.py:425

  • This docsearch.drop() call is at the module level (outside any test) and will raise a NameError. Move it inside the appropriate test or remove it.
    docsearch.drop()

@vgvoleg vgvoleg merged commit ac31c66 into main Jul 9, 2025
7 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.

1 participant