archivebox.search.config

Module Contents

Functions

get_default_search_mode

Choose the default search mode from config and discovered backends.

get_search_mode

Normalize a user-supplied search mode or fall back to the default.

get_search_mode_base

Return the mode portion of a normalized search mode.

get_search_mode_backend

Return the backend portion of a backend-qualified search mode.

get_search_mode_options

Build search mode choices for admin and public selectors.

Data

SEARCH_MODES

API

archivebox.search.config.SEARCH_MODES[source]

(‘meta’, ‘contents’, ‘deep’)

archivebox.search.config.get_default_search_mode(config: dict[str, Any] | None = None, **config_kwargs: Any) str[source]

Choose the default search mode from config and discovered backends.

archivebox.search.config.get_search_mode(search_mode: str | None, config: dict[str, Any] | None = None, **config_kwargs: Any) str[source]

Normalize a user-supplied search mode or fall back to the default.

archivebox.search.config.get_search_mode_base(search_mode: str | None, config: dict[str, Any] | None = None, **config_kwargs: Any) str[source]

Return the mode portion of a normalized search mode.

archivebox.search.config.get_search_mode_backend(search_mode: str | None, config: dict[str, Any] | None = None, **config_kwargs: Any) str | None[source]

Return the backend portion of a backend-qualified search mode.

archivebox.search.config.get_search_mode_options(config: dict[str, Any] | None = None, **config_kwargs: Any) list[dict[str, str]][source]

Build search mode choices for admin and public selectors.