To modify the previous implementation to use Qdrant for hybrid search (vector + keyword search) while keeping Neo4j for Cypher queries in Clojure, we’ll integrate the Qdrant database for the hybrid search part and use Neo4j solely for graph-based Cypher retrieval. Below, I’ll adapt the code assuming you have a Qdrant instance running and a Neo4j database populated with graph data. We’ll use the Qdrant REST API via clj-http for simplicity, as there’s no official Clojure client for Qdrant (though you could use a gRPC client if preferred).
- Qdrant Instance: Running locally (e.g.,
http://localhost:6333) or on a remote server, with a collection set up for hybrid search (vector embeddings + text payloads). - Neo4j Database: Populated and accessible via Bolt (e.g.,
bolt://localhost:7687). - Clojure Dependencies: Add
clj-httpandcheshire(for JSON parsing) to yourproject.clj: