-
EAP – Document Indexing
EAP – Document Indexing # ── STEP 3 + 4: Embed + index ───────────────────────── collection_id = f"col-{tenant_id}" logger.info("📦 Indexing Into Vector Search") t0 = perf_counter() index_result = await index_chunks( project_id=PROJECT_ID, location=LOCATION, collection_id=collection_id, chunks=all_chunks, event_status=event_status, ) timings["indexing"] = perf_counter() – t0 logger.info(f"✅ Indexing Complete [{_fmt(timings['indexing'])}]") import logging import hashlib from typing import List, Dict from rag_pipeline.indexing import VectorIndexClient, enforce_schema from rag_pipeline.indexing.helpers import ( build_data_schema, build_auto_embedding_vector_schema, ) logger = logging.getLogger("VectorIndexingService") # – – ———————————— # Schema Configuration # – – ———————————— EMBEDDING_FIELD = "embedding" DATA_SCHEMA = build_data_schema( properties={ "file_name": {"type": "string"}, "body": {"type": "string"}, }, required=["body"], ) VECTOR_SCHEMA = build_auto_embedding_vector_schema( embedding_field=EMBEDDING_FIELD, text_template="{body}",
