diff --git a/app/indexing/qdrant_client.py b/app/indexing/qdrant_client.py index 41f2b45..77eca7b 100644 --- a/app/indexing/qdrant_client.py +++ b/app/indexing/qdrant_client.py @@ -74,7 +74,7 @@ def upsert_chunks( return 0 qpoints = [ qm.PointStruct( - id=_qid(chunk_id), + id=chunk_id, vector={DENSE_VECTOR_NAME: vector}, payload={**payload, "chunk_id": chunk_id}, ) @@ -96,8 +96,3 @@ def delete_by_document(document_id: str, collection: str | None = None) -> int: ), ) return 1 - - -def _qid(chunk_id: str) -> str: - """Qdrant accepts UUID strings or unsigned ints. Chunks are UUIDs already.""" - return chunk_id diff --git a/frontend/src/services/types.ts b/frontend/src/services/types.ts index 9feab51..07013a4 100644 --- a/frontend/src/services/types.ts +++ b/frontend/src/services/types.ts @@ -47,6 +47,7 @@ export interface SearchHit { citation: Citation; quality_flags: QualityFlags; metadata: Record; + ocr_confidence?: number | null; } export interface SearchResponse { diff --git a/frontend/src/widgets/SearchResultCard.tsx b/frontend/src/widgets/SearchResultCard.tsx index b017519..cbf8f4c 100644 --- a/frontend/src/widgets/SearchResultCard.tsx +++ b/frontend/src/widgets/SearchResultCard.tsx @@ -20,9 +20,7 @@ interface Props { } export function SearchResultCard({ hit, query, active, onSelect, reranked }: Props) { - const ocrConf = - (hit.metadata as { ocr_confidence?: number })?.ocr_confidence ?? - null; + const ocrConf = hit.ocr_confidence ?? null; return (