crw_search/lib.rs
1//! SearXNG-backed search client and result transforms.
2//!
3//! Public surface mirrors `crw-saas/src/lib/{searxng-client,search-params,search-transform}.ts`
4//! so the SaaS layer can be reduced to a thin proxy over `/v1/search`.
5//!
6//! - [`client::SearxngClient`] — HTTP client wrapping `reqwest::Client`.
7//! - [`params::map_to_searxng_params`] — translate a public [`SearchRequest`]
8//! into SearXNG query parameters.
9//! - [`transform::transform_flat`] / [`transform::transform_grouped`] — turn
10//! a [`client::SearxngResponse`] into the user-facing result shape.
11//!
12//! [`SearchRequest`]: crw_core::types::SearchRequest
13
14pub mod client;
15pub mod params;
16pub mod rerank;
17pub mod structured;
18pub mod transform;
19pub mod wikidata;
20
21pub use client::{SearchError, SearxngClient, SearxngResponse, SearxngResult};
22pub use params::{SearxngParams, clean_query, map_to_searxng_params};
23pub use rerank::{rerank, rerank_relevance};
24pub use structured::{StructuredFact, structured_facts};
25pub use transform::{transform_flat, transform_flat_reranked, transform_grouped};