compass.scripts.search.run_search#
- async run_search(request, config_path=None)[source]#
Run search-engine queries for every jurisdiction in a config
The function loads jurisdictions, fetches query templates from the plugin registered for
tech, formats them, and submits each query to the configured search engines (with fallback). All ranked URLs are returned in a JSON-serializable structure annotated with filtering reasons (blacklist, duplicate, or beyond requested top-N).- Parameters:
request (
compass.pipeline.data_classes.BaseRequest) – The request object containing all user-specified settings and configurations for the pipeline run. This should be an instance of one of the specific request types (e.g., ProcessRequest, CollectionRequest, ExtractionRequest) that inherit from BaseRequest, and should include all necessary information such as the mode to run in, output directories, jurisdiction information, model configurations, and any other relevant settings.config_path (path-like, optional) – Absolute path of the originating config file, embedded in the returned report for traceability. By default,
None.
- Returns:
dict– JSON-serializable report containing per-jurisdiction ranked URLs and filtering reasons.