searchez 1.0.0

A searchable-model layer for Rust: make a type searchable, keep the index in sync, and search with real relevance ranking — over a pluggable backend, with a batteries-included in-memory engine that needs no external service.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// searchez/src/error.rs

use thiserror::Error;

/// What can go wrong talking to a search backend.
#[derive(Debug, Error)]
pub enum SearchError {
    /// The backend rejected or failed an operation (network, server, I/O).
    #[error("search backend error: {0}")]
    Backend(String),

    /// A document was missing the id field, or an id couldn't be represented.
    #[error("invalid document: {0}")]
    InvalidDocument(String),
}

pub type Result<T> = std::result::Result<T, SearchError>;