Legal Search Foundation
Legal Search Foundation
Section titled “Legal Search Foundation”Search foundations are implemented at the data layer
Section titled “Search foundations are implemented at the data layer”Leci already includes structural prerequisites for legal search, even though full API/product search flows are still roadmap work. This allows incremental implementation without redesigning the core schema.
Implemented search primitives
Section titled “Implemented search primitives”Current code provides:
- generated Portuguese
tsvectorondocument_nodes; - GIN index for full-text search performance;
- embeddings table with
vector(768)column; - IVFFlat vector index for similarity retrieval.
Practical implication today
Section titled “Practical implication today”The database is ready for full-text and semantic query strategies, but no internal API route currently exposes a production search contract.
🚧 Planned Feature — Endpoint-level search contracts, ranking strategies, and pagination semantics are part of roadmap milestones.
Relevance and quality direction
Section titled “Relevance and quality direction”Planned relevance model should include:
- lexical precision baseline (FTS);
- optional semantic reranking where data quality supports it;
- explicit traceability of match origin for legal confidence.
Performance considerations
Section titled “Performance considerations”Search performance risk grows with ingestion scale and combined lexical/vector querying.