Skip to content
Tech News
← Back to articles

SearXNG in Rust

read original more articles
Why This Matters

The development of SearXNG in Rust introduces a high-performance, privacy-focused search engine that efficiently aggregates results from multiple sources using advanced ranking techniques like Reciprocal Rank Fusion. This advancement benefits both the tech industry and consumers by providing faster, more relevant search results while emphasizing privacy and open-source collaboration.

Key Takeaways

A SearXNG-style metadata search engine written in Rust. Fans out queries to multiple search engines concurrently, scrapes their HTML results, deduplicates by normalized URL, and ranks using Reciprocal Rank Fusion (RRF).

How it works

A search request arrives at GET /search?q=<query> The query is sent concurrently to DuckDuckGo, Brave, Startpage, and Yahoo via reqwest Each engine parses the HTML response with scraper (CSS selectors over Mozilla's html5ever) Results are deduplicated by normalized URL (tracking params stripped, locale prefixes removed, query params sorted) Duplicate URLs are merged and scored with RRF ( score = Σ 1/(60 + rank) across engines) — pages returned by multiple engines rank higher The top results are returned as JSON

Requirements

Rust 1.75+

Cargo

Installation

As a library

cargo add metadata-search-engine-rs

Or add manually to Cargo.toml :

... continue reading