Documentation Index
Fetch the complete documentation index at: https://mintlify.com/castorini/quackir/llms.txt
Use this file to discover all available pages before exploring further.
SearchType is an enum exported from the top-level quackir package. It is passed as the method argument to Searcher.search() to select which retrieval strategy to execute.
Members
| Member | Value | Description |
|---|---|---|
SearchType.SPARSE | 'sparse' | BM25 full-text search against a contents column. |
SearchType.DENSE | 'dense' | Cosine similarity search against an embedding column. |
SearchType.HYBRID | 'hybrid' | Reciprocal Rank Fusion (RRF) combining sparse and dense results. |
Usage
Pass aSearchType member as the method argument to searcher.search():
When
method is SearchType.SPARSE or SearchType.HYBRID, the query_string is automatically tokenized with Pyserini’s Lucene Analyzer unless tokenize_query=False is passed.Query tokenization behavior
method | tokenize_query=True (default) | tokenize_query=False |
|---|---|---|
SPARSE | query_string is tokenized | query_string used as-is |
DENSE | No tokenization applied | No tokenization applied |
HYBRID | query_string is tokenized | query_string used as-is |