Home / Function/ test_qdrant_from_existing_collection_uses_same_collection() — langchain Function Reference

test_qdrant_from_existing_collection_uses_same_collection() — langchain Function Reference

Architecture documentation for the test_qdrant_from_existing_collection_uses_same_collection() function in test_from_existing.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b6fe75ca_2bd4_80d6_16cd_1b2004f9cdb9["test_qdrant_from_existing_collection_uses_same_collection()"]
  a49c91ad_53c9_21fe_b326_c9ed360afc67["test_from_existing.py"]
  b6fe75ca_2bd4_80d6_16cd_1b2004f9cdb9 -->|defined in| a49c91ad_53c9_21fe_b326_c9ed360afc67
  style b6fe75ca_2bd4_80d6_16cd_1b2004f9cdb9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_from_existing.py lines 19–50

def test_qdrant_from_existing_collection_uses_same_collection(
    location: str,
    vector_name: str,
    retrieval_mode: RetrievalMode,
    sparse_vector_name: str,
) -> None:
    """Test if the QdrantVectorStore.from_existing_collection reuses the collection."""
    collection_name = uuid.uuid4().hex
    docs = ["foo"]
    QdrantVectorStore.from_texts(
        docs,
        embedding=ConsistentFakeEmbeddings(),
        collection_name=collection_name,
        location=location,
        vector_name=vector_name,
        retrieval_mode=retrieval_mode,
        sparse_vector_name=sparse_vector_name,
        sparse_embedding=ConsistentFakeSparseEmbeddings(),
    )

    qdrant = QdrantVectorStore.from_existing_collection(
        collection_name,
        embedding=ConsistentFakeEmbeddings(),
        location=location,
        vector_name=vector_name,
        retrieval_mode=retrieval_mode,
        sparse_vector_name=sparse_vector_name,
        sparse_embedding=ConsistentFakeSparseEmbeddings(),
    )
    qdrant.add_texts(["baz", "bar"])

    assert qdrant.client.count(collection_name).count == 3

Domain

Subdomains

Frequently Asked Questions

What does test_qdrant_from_existing_collection_uses_same_collection() do?
test_qdrant_from_existing_collection_uses_same_collection() is a function in the langchain codebase, defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_from_existing.py.
Where is test_qdrant_from_existing_collection_uses_same_collection() defined?
test_qdrant_from_existing_collection_uses_same_collection() is defined in libs/partners/qdrant/tests/integration_tests/qdrant_vector_store/test_from_existing.py at line 19.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free