pub enum QueryExpr {
Show 13 variants
Points {
ids: Vec<PointId>,
},
Nearest {
input: QueryInput,
using: Option<VectorTarget>,
prefetch: Vec<Prefetch>,
mmr: Option<Box<MmrConfig>>,
},
Recommend {
positive: Vec<QueryInput>,
negative: Vec<QueryInput>,
strategy: Option<RecommendStrategy>,
using: Option<VectorTarget>,
prefetch: Vec<Prefetch>,
},
Context {
pairs: Vec<ContextPair>,
using: Option<VectorTarget>,
prefetch: Vec<Prefetch>,
},
Discover {
target: QueryInput,
context: Vec<ContextPair>,
using: Option<VectorTarget>,
prefetch: Vec<Prefetch>,
},
OrderBy {
field: String,
direction: OrderDirection,
start_from: Option<Value>,
},
SampleRandom,
Fusion {
method: FusionMethod,
prefetch: Vec<Prefetch>,
},
Formula {
expression: Box<FormulaExpr>,
defaults: Vec<(String, Value)>,
prefetch: Vec<Prefetch>,
},
RelevanceFeedback {
target: QueryInput,
feedback: Vec<FeedbackItem>,
strategy: FeedbackStrategy,
using: Option<VectorTarget>,
prefetch: Vec<Prefetch>,
},
Hybrid {
text: String,
model: Option<String>,
dense_vector: Option<String>,
sparse_vector: Option<String>,
fusion: FusionMethod,
text_param: Option<String>,
},
Rerank {
input: QueryInput,
model: String,
using: Option<VectorTarget>,
prefetch: Vec<Prefetch>,
},
CrossRerank {
query: String,
model: String,
field: Option<String>,
prefetch: Vec<Prefetch>,
query_param: Option<String>,
},
}Expand description
QUERY expression body — the retrieval strategy and its inputs.
Variants§
Points
QUERY POINTS (ids) — direct retrieval of the listed points.
Nearest
QUERY [NEAREST] <input> FROM <coll> — vector nearest-neighbor search.
Fields
input: QueryInputEmbeddable input, vector, or reference point.
using: Option<VectorTarget>USING vector target; schema-resolved when None.
Recommend
QUERY RECOMMEND POSITIVE … [NEGATIVE …] — recommend from examples.
Fields
positive: Vec<QueryInput>Examples to move toward.
negative: Vec<QueryInput>Examples to move away from.
strategy: Option<RecommendStrategy>Scoring strategy; server default when None.
using: Option<VectorTarget>USING vector target; schema-resolved when None.
Context
QUERY CONTEXT (POSITIVE … NEGATIVE …) — search guided by example pairs.
Fields
pairs: Vec<ContextPair>Positive/negative example pairs.
using: Option<VectorTarget>USING vector target; schema-resolved when None.
Discover
QUERY DISCOVER TARGET … CONTEXT (…) — discovery from target plus pairs.
Fields
target: QueryInputPrimary target input.
context: Vec<ContextPair>Guiding positive/negative pairs.
using: Option<VectorTarget>USING vector target; schema-resolved when None.
OrderBy
QUERY ORDER BY field [ASC|DESC] [START FROM <value>] — payload-value ordering.
Fields
direction: OrderDirectionSort direction (ASC default).
SampleRandom
QUERY SAMPLE RANDOM — random sample of points.
Fusion
QUERY FUSION RRF|DBSF — fuse results of the prefetch stages.
Fields
method: FusionMethodFusion algorithm.
Formula
QUERY FORMULA <expr> [DEFAULTS (…)] — formula-expression rescoring.
Fields
expression: Box<FormulaExpr>Rescoring expression tree.
RelevanceFeedback
QUERY RELEVANCE FEEDBACK TARGET … FEEDBACK (…) — naive feedback search.
Fields
target: QueryInputBase target input.
feedback: Vec<FeedbackItem>Weighted feedback examples.
strategy: FeedbackStrategySTRATEGY NAIVE (a = …, b = …, c = …) weights.
using: Option<VectorTarget>USING vector target; schema-resolved when None.
Hybrid
QUERY HYBRID TEXT … [DENSE n] [SPARSE n] [FUSION m] — dense+sparse fusion.
Fields
fusion: FusionMethodFusion method for the two stages.
Rerank
QUERY RERANK <input> MODEL '…' — late-interaction rerank over prefetch.
Fields
input: QueryInputQuery input embedded via USING.
using: Option<VectorTarget>Dense (or multivector) target for document embeddings.
CrossRerank
Cross-encoder pair rerank: score query against PREFETCH document texts. Not sent to Qdrant as MaxSim — executor scores client-side then reorders.