## MODIFIED Requirements ### Requirement: Hybrid search The engine SHALL provide hybrid search combining BM25 full-text search (via FTS5) and vector similarity search (via sqlite-vec), merged using Reciprocal Rank Fusion. Search SHALL complete in under 100ms when the model is warm. The engine SHALL sanitize user query strings to prevent FTS5 syntax errors for any input. #### Scenario: Search with special characters - **WHEN** a client sends `POST /api/v1/search` with body `{"query": "what color is grass?"}` - **THEN** the engine SHALL sanitize the query for FTS5, execute the search successfully, and return results (not a 500 error) #### Scenario: Search with FTS5 operators in query - **WHEN** a client sends `POST /api/v1/search` with body `{"query": "NOT something OR (other)"}` - **THEN** the engine SHALL treat the input as literal search terms, not FTS5 operators, and return matching results #### Scenario: Search with only special characters - **WHEN** a client sends `POST /api/v1/search` with body `{"query": "??!@#"}` - **THEN** the engine SHALL return HTTP 200 with an empty result set (not a 500 error) #### Scenario: Search with quotes in query - **WHEN** a client sends `POST /api/v1/search` with body `{"query": "the \"quick\" fox"}` - **THEN** the engine SHALL sanitize embedded quotes and return results normally