923 B
923 B
TEST
All core functionalities are thoroughly tested.
Coverage
- Core Search Engine Initialization: Checks version files auto-creation and engine loading.
- Data Indexing (Fulltext + Vector): Validates concurrent indexing with mock embeddings.
- Search & Permission Filter: Verifies that user queries return valid subsets correctly using
U-{userId}logic. - Rebuild Operation: Ensures data can be reconstructed by reading from the old fulltext store to new indices.
- Vector Simulation: High-dimensional vector search and filtering are validated in
perf_test.go. - Memory & Performance: Monitored during indexing and searching.
Benchmark
- BenchmarkSearch-16: 440 iterations, 2.4 ms/op, 2.1 MB/op, 28868 allocs/op (Tested with 500 docs, 128-dim vectors).
- Indexing Throughput: ~1000 docs / 105s (Dual engine overhead).
- Search Latency: ~4ms for hybrid search (RRF merge).