Home / Function/ test_aindexing_force_update() — langchain Function Reference

test_aindexing_force_update() — langchain Function Reference

Architecture documentation for the test_aindexing_force_update() function in test_indexing.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  4a37132b_dea1_ef5e_26da_6c47e2537dd3["test_aindexing_force_update()"]
  9bc4e8b6_769a_ae11_3fc1_309cb678c248["test_indexing.py"]
  4a37132b_dea1_ef5e_26da_6c47e2537dd3 -->|defined in| 9bc4e8b6_769a_ae11_3fc1_309cb678c248
  style 4a37132b_dea1_ef5e_26da_6c47e2537dd3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/indexes/test_indexing.py lines 1423–1478

async def test_aindexing_force_update(
    arecord_manager: SQLRecordManager,
    upserting_vector_store: VectorStore,
) -> None:
    """Test indexing with force update."""
    docs = [
        Document(
            page_content="This is a test document.",
            metadata={"source": "1"},
        ),
        Document(
            page_content="This is another document.",
            metadata={"source": "2"},
        ),
        Document(
            page_content="This is a test document.",
            metadata={"source": "1"},
        ),
    ]

    assert await aindex(
        docs,
        arecord_manager,
        upserting_vector_store,
        cleanup="full",
    ) == {
        "num_added": 2,
        "num_deleted": 0,
        "num_skipped": 1,
        "num_updated": 0,
    }

    assert await aindex(
        docs,
        arecord_manager,
        upserting_vector_store,
        cleanup="full",
    ) == {
        "num_added": 0,
        "num_deleted": 0,
        "num_skipped": 3,
        "num_updated": 0,
    }

    assert await aindex(
        docs,
        arecord_manager,
        upserting_vector_store,
        cleanup="full",
        force_update=True,
    ) == {
        "num_added": 0,
        "num_deleted": 0,
        "num_skipped": 1,
        "num_updated": 2,
    }

Domain

Subdomains

Frequently Asked Questions

What does test_aindexing_force_update() do?
test_aindexing_force_update() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/indexes/test_indexing.py.
Where is test_aindexing_force_update() defined?
test_aindexing_force_update() is defined in libs/langchain/tests/unit_tests/indexes/test_indexing.py at line 1423.

Analyze Your Own Codebase

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

Try Supermodel Free