archivebox.search.viewsο
Module Contentsο
Functionsο
Build the cache key for one user and changelist URL. |
|
Build the cache key for one public search URL. |
|
Return streamed admin search IDs from Django cache. |
|
Return streamed public search IDs from Django cache. |
|
Return streamed public search state from Django cache. |
|
Yield URL prefixes that can use indexed startswith scans for common search input. |
|
Return the exclusive upper bound for an indexed URL prefix range. |
|
Yield IDs for one URL prefix using the URL index, then apply caller filters. |
|
Yield metadata search matches from a filtered Snapshot queryset. |
|
Return a compact Snapshot ID string from a search provider result. |
|
Yield provider IDs that still match the filtered queryset. |
|
Yield filtered Snapshot IDs from the selected search provider. |
|
Stream Snapshot search progress and cache matching IDs for a list view. |
|
Stream admin Snapshot search progress and cache matching IDs. |
|
Stream public Snapshot search progress and cache matching IDs. |
Dataο
APIο
- archivebox.search.views.get_admin_search_cache_key(request, url: str | None = None) str[source]ο
Build the cache key for one user and changelist URL.
- archivebox.search.views.get_public_search_cache_key(request, url: str | None = None) str[source]ο
Build the cache key for one public search URL.
- archivebox.search.views.get_cached_admin_search_ids(request) list[str] | None[source]ο
Return streamed admin search IDs from Django cache.
- archivebox.search.views.get_cached_public_search_ids(request) list[str] | None[source]ο
Return streamed public search IDs from Django cache.
- archivebox.search.views.get_cached_public_search_state(request) dict | None[source]ο
Return streamed public search state from Django cache.
- archivebox.search.views.iter_url_search_prefixes(query: str)[source]ο
Yield URL prefixes that can use indexed startswith scans for common search input.
- archivebox.search.views.url_prefix_upper_bound(prefix: str) str[source]ο
Return the exclusive upper bound for an indexed URL prefix range.
- archivebox.search.views.iter_url_prefix_search_ids(prefix: str, queryset)[source]ο
Yield IDs for one URL prefix using the URL index, then apply caller filters.
- archivebox.search.views.iter_meta_search_ids(query, queryset)[source]ο
Yield metadata search matches from a filtered Snapshot queryset.
- archivebox.search.views.normalize_search_result_id(snapshot_id) str | None[source]ο
Return a compact Snapshot ID string from a search provider result.
- archivebox.search.views.iter_filtered_search_result_ids(iterator, queryset, *, flush_max_delay=0.05)[source]ο
Yield provider IDs that still match the filtered queryset.
This is the single intersection/dedupe path used for metadata and every search backend. It flushes by elapsed time so sparse providers stream rows as soon as IDs are found instead of waiting for a fixed batch size.
- archivebox.search.views.iter_search_result_ids(query, base_queryset, *, search_mode, config)[source]ο
Yield filtered Snapshot IDs from the selected search provider.
- archivebox.search.views.snapshot_search_stream_response(query, base_queryset, *, search_mode, config, cache_key, thread_name)[source]ο
Stream Snapshot search progress and cache matching IDs for a list view.