Home / Companies / SurrealDB / Blog / Post Details
Content Deep Dive

Hybrid vector + text Search in the terminal with SurrealDB and Ratatui

Blog post from SurrealDB

Post Details
Company
Date Published
Author
Dave MacLeod
Word Count
9,594
Language
English
Hacker News Points
-
Summary

SurrealDB, a database built in Rust, combines a graphical interface and low-level command-line capabilities, making it versatile for various applications, including small edge devices. The blog post discusses using SurrealDB in conjunction with Ratatui, a tool for building terminal user interfaces in Rust, to create an AI-native demo app that integrates Wikipedia API-sourced documents, allowing users to link and search documents through both full-text and semantic search methods. A significant focus is on the novel "hybrid search" feature, recently added to SurrealDB, which combines lexical search with vector search using Reciprocal Rank Fusion (RRF) to enhance search precision and recall. The post also delves into the technicalities of implementing hybrid search, its benefits, and the setup required. Additionally, the app demonstrates how to perform various searches, including full-text and semantic searches using embeddings from OpenAI and Mistral, with the ability to visualize connections between articles. The post concludes with instructions on running the app using Rust, emphasizing the need for OpenAI and Mistral API keys for full functionality.