archivebox.search
Search module for ArchiveBox.
Search indexing is handled by search backend hooks in plugins: abx_plugins/plugins/search_backend_/on_Snapshot__index*.py
This module provides the query interface that dynamically discovers search backend plugins using the hooks system.
Search backends must provide a search.py module with: - search(query: str) -> List[str] (returns snapshot IDs) - flush(snapshot_ids: Iterable[str]) -> None
Submodules
Package Contents
Functions
Discover all available search backend plugins. |
|
Get the configured search backend module. |
|
Search for snapshots matching the query. |
|
Remove snapshots from the search index. |
Data
API
- archivebox.search.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]
- archivebox.search.get_available_backends() dict[source]
Discover all available search backend plugins.
Uses the hooks system to find plugins with search.py modules. Results are cached after first call.
- archivebox.search.get_backend() Any[source]
Get the configured search backend module.
Discovers available backends via the hooks system and returns the one matching SEARCH_BACKEND_ENGINE configuration.
Falls back to ‘ripgrep’ if configured backend is not found.