Skip to main content

Module query

Module query 

Source
Expand description

Query types and search execution

Structs§

Bm25Params
BM25 parameters
BooleanQuery
Boolean query with MUST, SHOULD, and MUST_NOT clauses
BoostQuery
Boost query - multiplies the score of the inner query
DenseVectorQuery
Dense vector query for similarity search
DocAddress
Unique document address: segment_id (hex) + local doc_id within segment
EmptyScorer
Empty scorer for terms that don’t exist
GlobalStats
Global statistics aggregated across all segments
GlobalStatsBuilder
Builder for aggregating statistics from multiple segments
GlobalStatsCache
Cached global statistics with automatic invalidation
HeapEntry
Entry for top-k min-heap
MatchedField
Matched field info with ordinals (for multi-valued fields)
PhraseQuery
Phrase query - matches documents containing terms in consecutive positions
ScoreCollector
Efficient top-k collector using min-heap
ScoredDoc
Search result from WAND execution
SearchHit
Search hit with unique document address and score
SearchResponse
Search response with hits (IDs only, no documents)
SearchResult
Search result with doc_id and score (internal use)
SparseFieldStats
Statistics for a sparse vector field
SparseTermScorer
Scorer for sparse vector dimensions
SparseVectorQuery
Sparse vector query for similarity search
TermQuery
Term query - matches documents containing a specific term
TermQueryInfo
Info for WAND-optimizable term queries
TextFieldStats
Statistics for a full-text field
TextTermScorer
Scorer for full-text terms using WAND optimization
TopKCollector
Collector for top-k results
WandExecutor
Generic MaxScore WAND executor for top-k retrieval
WandOrQuery
WAND-optimized OR query for multiple terms

Enums§

MultiValueCombiner
Strategy for combining scores when a document has multiple values for the same field

Constants§

BM25_B
BM25 b parameter - controls length normalization 0 = no length normalization, 1 = full normalization
BM25_K1
BM25 k1 parameter - controls term frequency saturation Higher values give more weight to term frequency

Traits§

Query
A search query (async)
Scorer
Scorer that iterates over matching documents and computes scores
ScoringIterator
Common interface for scoring iterators (text terms or sparse dimensions)

Functions§

bm25_idf
Compute IDF (Inverse Document Frequency) using BM25 variant
bm25_score
Compute BM25 score for a term occurrence
bm25_upper_bound
Compute BM25 upper bound score for WAND pruning
bm25f_score
Compute BM25F score with field boost
bm25f_upper_bound
Compute BM25F upper bound score for WAND pruning with field boost
search_segment
Execute a search query on a single segment (async)
search_segment_with_positions
Execute a search query on a single segment with optional position collection (async)

Type Aliases§

CountFuture
Future type for count estimation
MatchedPositions
Matched positions for a field (field_id, list of encoded positions)
ScorerFuture
Future type for scorer creation