2026-05-15 21:50:12 +08:00
|
|
|
# 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.
|
2026-05-16 01:36:44 +08:00
|
|
|
- **Vector Simulation**: High-dimensional vector search and filtering are validated in `perf_test.go`.
|
|
|
|
|
- **Memory & Performance**: Monitored during indexing and searching.
|
2026-05-15 21:50:12 +08:00
|
|
|
|
|
|
|
|
## Benchmark
|
2026-05-16 01:36:44 +08:00
|
|
|
- **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).
|