archivebox.search.query
Module Contents
Functions
Escape a string for SQLite LIKE matching. |
|
Build a Snapshot Q predicate matching values inside Crawl.config. |
|
Build ordered metadata predicates for Snapshot search. |
|
Rank metadata hits before backend full-text hits. |
|
Apply shared CLI/API/public/admin Snapshot search semantics. |
|
Return a Snapshot queryset from backend search IDs. |
|
Yield snapshot IDs from configured search backend modules. |
|
Remove Snapshot IDs from the configured search backend index. |
Data
API
- archivebox.search.query.escape_like_query(query: str) str[source]
Escape a string for SQLite LIKE matching.
- archivebox.search.query.crawl_config_values_search_wave(query: str) django.db.models.Q | None[source]
Build a Snapshot Q predicate matching values inside Crawl.config.
- archivebox.search.query.snapshot_metadata_search_waves(query: str, *, include_id_matches: bool = False) list[django.db.models.Q][source]
Build ordered metadata predicates for Snapshot search.
- archivebox.search.query.prioritize_metadata_matches(base_queryset: django.db.models.QuerySet, metadata_queryset: django.db.models.QuerySet, fulltext_queryset: django.db.models.QuerySet, *, deep_queryset: django.db.models.QuerySet | None = None, ordering: list[str] | tuple[str, ...] | None = None) django.db.models.QuerySet[source]
Rank metadata hits before backend full-text hits.
- archivebox.search.query.apply_snapshot_search(base_queryset: django.db.models.QuerySet, query: str, *, search_mode: str | None = None, config: dict[str, Any] | None = None, ordering: list[str] | tuple[str, ...] | None = None, max_results: int | None = None, skip_backend_when_metadata_satisfies_limit: bool = False, include_metadata_for_forced_backend: bool = False, include_id_matches: bool = False) django.db.models.QuerySet[source]
Apply shared CLI/API/public/admin Snapshot search semantics.
- archivebox.search.query.query_search_index(query: str, search_mode: str | None = None, config: dict[str, Any] | None = None, max_results: int | None = None, **config_kwargs: Any) django.db.models.QuerySet[source]
Return a Snapshot queryset from backend search IDs.