Skip to main content

gobby_code/search/
fts.rs

1//! PostgreSQL pg_search BM25 query sanitization and execution.
2//!
3//! The module name stays `fts` to keep command wiring stable; runtime keyword
4//! search is pg_search BM25 against Gobby's PostgreSQL hub.
5
6mod common;
7mod content;
8mod counts;
9mod graph;
10mod symbols;
11
12#[cfg(test)]
13mod tests;
14
15pub use common::{
16    FILTERED_FETCH_CAP, ResolvedGraphSymbol, compile_patterns, expand_paths,
17    path_filter_requires_post_filter, sanitize_pg_search_query,
18};
19pub use content::{search_content, search_content_visible};
20pub use counts::{count_content, count_content_visible, count_text, count_text_visible};
21pub use graph::{resolve_graph_symbol, resolve_graph_symbol_by_id};
22pub use symbols::{
23    VisibleSearchOutcome, search_symbols_by_name, search_symbols_by_name_visible,
24    search_symbols_exact_first, search_symbols_exact_first_visible, search_symbols_fts,
25    search_symbols_fts_visible, search_text, search_text_visible,
26};
27
28#[cfg(test)]
29use common::{append_unique_symbols, glob_to_like_prefix, path_like_prefixes};
30#[cfg(test)]
31use content::make_snippet;