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.
SQLiteSearcher queries BM25 full-text indexes stored in SQLite FTS5 virtual tables created by SQLiteIndexer. It implements the abstract Searcher base class. Dense and hybrid retrieval are not supported.
Constructor
Path to the SQLite database file produced by
SQLiteIndexer.Methods
search
SearchType.SPARSE produces results. Filters out query_id from the returned list when provided.
Should be
SearchType.SPARSE for SQLiteSearcher.Document ID to exclude from results.
Text query for sparse search. Required when
method is SPARSE.Unused by SQLiteSearcher.
Maximum number of results to return.
When
True, the query_string is tokenized with Pyserini’s Lucene Analyzer before querying.List containing the name of the sparse table to search.
Unused by SQLiteSearcher.
List of
(doc_id, score) tuples ordered by descending BM25 score.fts_search
fts_{table_name} FTS5 virtual table. Query terms are individually quoted and joined with OR to support any-term matching.
SQLite FTS5’s
bm25() function returns negative values by convention (lower rank = better). SQLiteSearcher negates the score so that higher values indicate better matches, consistent with the rest of the QuackIR API.Query string. Individual terms are quoted and OR-joined.
Maximum number of results to return.
Name of the base table. The FTS5 virtual table
fts_{table_name} is queried.List of
(id, score) tuples.get_search_type
SearchType.SPARSE if a contents column is present, otherwise raises ValueError.
Table to inspect.
Always
SearchType.SPARSE for valid SQLite tables.filter_id
id matches query_id. Called automatically by search().
List of
(id, score) tuples.Document ID to remove.
Filtered results list.