nodedb_sql/planner/search_scope/mod.rs
1// SPDX-License-Identifier: Apache-2.0
2
3//! Plan-time refusal of index-owned search functions in row-evaluated
4//! positions.
5//!
6//! `bm25_score`, `search_score`, `text_match`, `search`, `rrf_score`,
7//! `sparse_score`, `graph_score`, `multi_vector_score` and
8//! `multi_vector_search` read a search index. The planner lowers each call it
9//! recognises into its search plan, which serves the score as a column. A
10//! call the planner could not lower stays in a filter, projection, sort key,
11//! assignment or aggregate argument. The row evaluator has no index and no
12//! value for it, so this pass refuses the statement at plan time. The
13//! refusal does not depend on whether the collection holds rows.
14//!
15//! A wrapper plan (a subquery tail, aggregate, join or lateral join) over a
16//! search plan is not checked for its own expressions: its projection names
17//! the score column the search plan serves.
18
19mod expressions;
20mod lookup;
21mod scope;
22
23pub use scope::refuse_row_scoped_search_functions;