//! SEARCH query AST, builder, response types, and executor.
//!
//! The primary query type is `Search` -- a typed representation capturing the
//! full intent of "retrieve and rank content matching this text/vector query."
//! Constructed via `SearchBuilder`.
//!
//! The `SearchExecutor` implements an 8-stage pipeline that blends BM25 text
//! relevance, ANN vector similarity, personalization, filtering, and diversity
//! enforcement into a single response:
//!
//! 1a. **Text retrieval** (BM25 via Tantivy, when `query_text` is set)
//! 1b. **Vector retrieval** (ANN via HNSW, when `query_vector` is set)
//! 1c. **Fusion** (RRF for hybrid; passthrough for single-modality)
//! 2. **Metadata filter** (bitmap + range indexes)
//! 2.5. **User-context filter** (seen, blocked, hard negatives)
//! 3. **Profile scoring** (signal-based, personalized when `for_user` is set)
//! 4. **Diversity enforcement** (per-creator, format-mix)
//! 5. **Result assembly** (with BM25 + semantic score explainability)

pub mod executor;
mod executor_helpers;
pub mod types;

pub mod scope;

pub use executor::SearchExecutor;
pub use types::{Search, SearchBuilder, SearchResultItem, SearchResults, WithinScope};
