A small indie search engine.
 
 
 
Go to file
~erin df116b1ef6
Show last updated time for search results
2023-07-26 09:11:07 -04:00
.cargo config changes 2023-07-25 14:59:47 -04:00
core Basic frontend Axum server 2023-07-25 23:24:29 -04:00
crawler Make search request 2023-07-26 09:06:41 -04:00
frontend Make search request 2023-07-26 09:06:41 -04:00
migrations Basic fuzzy search 2023-07-25 22:39:46 -04:00
static Show last updated time for search results 2023-07-26 09:11:07 -04:00
.gitignore Justfile 2023-07-25 19:47:39 -04:00
Cargo.lock Make search request 2023-07-26 09:06:41 -04:00
Cargo.toml Make search request 2023-07-26 09:06:41 -04:00
Justfile Justfile 2023-07-25 19:47:39 -04:00
README.md whoops 2023-07-25 23:19:23 -04:00

README.md

Ferret

Ferret is an attempt at a new, self-hosted, independent search engine.

Goals

  • Simple and accessible pure-HTML user interface
  • No tracking or bloat
  • Only indexes smaller actually cool sites

Technology

  • Written in Rust
  • Uses the Tokio async framwework
  • Uses Axum as a web framework
  • SQLx compile-time checked SQL queries

Development

  1. Install Rust via rustup
  2. Clone this repository
  3. Install sqlx-cli
  4. Set the DATABASE_URL environment variable to "sqlite:todos.db"
  5. Install the just command runner

Parts

The crawler is a self-contained executable, that when ran crawls through the URLs and inserts them into an SQL database.

The engine core is a server that hosts an API to perform search queries on the database. It creates a seperate indexed table in the database, and has a search endpoint at /api/search. It takes a POST request with a JSON body, and returns a JSON response.

The variables it takes are:

  • language: an ISO 639-3 lang code
  • include: the primary search query
  • ignore: keywords to ignore (optional)
  • option: a SearchType (Fuzzy, Regex, Sql)