docs/design_docs/segcore/Search.md
init: 7.23.2021, by FluorineDog
update: 2.10.2022, by zhuwenxing
Search now supports two modes: json DSL mode and Boolean Expr mode. We will talk about the latter one in detail because the former has been deprecated and is only used in tests.
The execution mode of Boolean Expr works as follows:
See details of expression usage at Boolean Expression Rules
After obtaining the AST, the execution engine uses the visitor mode to explain and executes the whole AST tree:
Each node includes two steps, a mandatory vector search and an optional predicate.
Currently, Milvus supports the following node on the AST, visitor mode is used to interpret and execute from top to bottom and generate the final bitmask.
A in [1, 2, 3]A > 1 B <= 1TermExpr and CompareExpr are leaf nodes of execution.