Skip to main content
When multiple Knowledge instances share the same vector database, searches return results from all instances by default. Set isolate_vector_search=True to scope each instance’s searches to its own data.

How It Works

When isolate_vector_search=True:
  1. Insert: Each document gets linked_to metadata set to the Knowledge instance’s name.
  2. Search: A linked_to filter is automatically injected, so only matching documents are returned.
When isolate_vector_search=False (default):
  1. Insert: No linked_to metadata is added.
  2. Search: No linked_to filter is applied. Searches return results from all documents in the vector database.

When to Use

Example: Shared Database, Isolated Searches

Backwards Compatibility

isolate_vector_search defaults to False. Existing Knowledge instances behave exactly as before.

Existing data does not have linked_to metadata

Documents indexed before this flag existed do not have linked_to in their vector database metadata. When you enable isolate_vector_search=True, searches filter for linked_to=<name>. Documents without this metadata field will not match and will be invisible to the isolated search.
Enabling isolate_vector_search=True with vector databases that don’t have existing linked_to metadata will cause those documents to disappear from search results. You must re-index or manually update the metadata to restore them.

Combining with Manual Filters

When isolate_vector_search=True, the linked_to filter is automatically merged with any filters you pass, regardless of filter format:

Instance Uniqueness

Each Knowledge instance must have a unique combination of name, database, and table. Two instances with the same name pointing to the same contents database and table will raise a ValueError at startup.
To fix this, give each instance a unique name, or point them to different contents databases or tables.

Requirements

  • The Knowledge instance must have a name set. Without a name, no linked_to metadata is added and no filter is applied, even when isolate_vector_search=True.
  • The vector database must support metadata filtering. See Filtering for supported databases.

Next Steps