.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.search.processors.offline.OfflineProcessor Class Reference
Inheritance diagram for searx.search.processors.offline.OfflineProcessor:
Collaboration diagram for searx.search.processors.offline.OfflineProcessor:

Public Member Functions

 search (self, str query, RequestParams params, "ResultContainer" result_container, float start_time, float timeout_limit)
Public Member Functions inherited from searx.search.processors.abstract.EngineProcessor
 __init__ (self, "Engine|types.ModuleType" engine)
 initialize (self, t.Callable[["EngineProcessor", bool], bool] callback)
bool init_engine (self)
 handle_exception (self, "ResultContainer" result_container, BaseException|str exception_or_message, bool suspend=False)
 extend_container (self, "ResultContainer" result_container, float start_time, "list[Result | LegacyResult]|None" search_results)
bool extend_container_if_suspended (self, "ResultContainer" result_container)
RequestParams|None get_params (self, "SearchQuery" search_query, str engine_category)
 get_tests (self)
 get_default_tests (self)

Static Public Attributes

str engine_type = "offline"

Additional Inherited Members

Public Attributes inherited from searx.search.processors.abstract.EngineProcessor
 engine = engine
logging.Logger logger = engines[engine.name].logger
SuspendedStatus suspended_status = SUSPENDED_STATUS.setdefault(key, SuspendedStatus())
Protected Member Functions inherited from searx.search.processors.abstract.EngineProcessor
 _extend_container_basic (self, "ResultContainer" result_container, float start_time, "list[Result | LegacyResult]" search_results)

Detailed Description

Processor class used by ``offline`` engines.

Definition at line 11 of file offline.py.

Member Function Documentation

◆ search()

searx.search.processors.offline.OfflineProcessor.search ( self,
str query,
RequestParams params,
"ResultContainer" result_container,
float start_time,
float timeout_limit )

Reimplemented from searx.search.processors.abstract.EngineProcessor.

Definition at line 16 of file offline.py.

23 ):
24 try:
25 search_results = self.engine.search(query, params)
26 self.extend_container(result_container, start_time, search_results)
27 except ValueError as e:
28 # do not record the error
29 self.logger.exception('engine {0} : invalid input : {1}'.format(self.engine.name, e))
30 except Exception as e: # pylint: disable=broad-except
31 self.handle_exception(result_container, e)
32 self.logger.exception('engine {0} : exception : {1}'.format(self.engine.name, e))

References searx.result_types._base.LegacyResult.engine, searx.result_types._base.MainResult.engine, searx.result_types._base.Result.engine, searx.search.processors.abstract.EngineProcessor.engine, searx.search.processors.abstract.EngineProcessor.extend_container(), searx.search.processors.abstract.EngineProcessor.handle_exception(), searx.enginelib.Engine.logger, and searx.search.processors.abstract.EngineProcessor.logger.

Here is the call graph for this function:

Member Data Documentation

◆ engine_type

str searx.search.processors.offline.OfflineProcessor.engine_type = "offline"
static

Definition at line 14 of file offline.py.


The documentation for this class was generated from the following file:
  • /home/andrew/Documents/code/public/searxng/searx/search/processors/offline.py