Skip to main content

handle_query

Function handle_query 

Source
pub async fn handle_query(
    query: &str,
    hybrid: bool,
    pipeline: bool,
    top_k: usize,
    logic_filter: Option<&str>,
    format: &OutputFormat,
) -> Result<()>
Expand description

Handle the top-level ipfrs query command.

  • In --pipeline mode, CIDs are read from stdin and the query string is used as a logic predicate template filter (identical to logic filter).
  • In --hybrid mode, both semantic and logic search are executed. If logic_filter is provided, the semantic results are then post-filtered through the logic engine using the given predicate template.
  • Otherwise the query is auto-routed: logic predicates go to the logic engine; natural-language strings go to semantic search.