一个基于 Rust 的 SearXNG 风格元数据搜索引擎项目近日发布 [1]。该引擎并发查询多个搜索服务,包括 DuckDuckGo、Brave、Startpage 和 Yahoo [1],抓取 HTML 结果后通过规范化 URL 进行去重,移除追踪参数、地区前缀和排序查询参数 [1]。
项目采用倒数排名融合算法(RRF)进行结果排序,计算公式为 score = Σ 1/(60 + rank) [1],最终返回聚合的 JSON 格式搜索结果 [1]。项目提供 GET /search?q= 和 GET /health 等 API 端点 [1],依赖 Rust 1.75 及以上版本和 Cargo [1]。项目包含完整的代码示例、API 文档、测试套件和扩展机制 [1],测试包括单元测试和标记为 #[ignore] 的实时测试 [1]。
A new open-source metasearch engine written in Rust has been released, offering an alternative approach to aggregating search results from multiple sources [1]. The project queries multiple search engines—including DuckDuckGo, Brave, Startpage, and Yahoo—simultaneously, retrieves HTML results, and consolidates them into a unified JSON response [1].
The engine employs a Reciprocal Rank Fusion (RRF) algorithm for ranking aggregated results, using the formula score = Σ 1/(60 + rank) to combine rankings from different sources [1]. To prevent duplicate entries, the system normalizes URLs by removing tracking parameters, regional prefixes, and sorting query parameters [1]. Users can access search functionality through a GET /search?q= API endpoint, with a GET /health route available for system status checks [1].
The project includes comprehensive documentation with API specifications, code examples, and a full test suite comprising both unit tests and live integration tests marked with #[ignore] for optional execution [1]. Development requires Rust 1.75 or later and Cargo, establishing a straightforward setup process for contributors and users seeking to deploy or extend the engine [1].