.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, query, params, result_container, start_time, timeout_limit)
 
- Public Member Functions inherited from searx.search.processors.abstract.EngineProcessor
 __init__ (self, engine, str engine_name)
 
 initialize (self)
 
 has_initialize_function (self)
 
 handle_exception (self, result_container, exception_or_message, suspend=False)
 
 extend_container (self, result_container, start_time, search_results)
 
 extend_container_if_suspended (self, result_container)
 
 get_params (self, search_query, engine_category)
 
 get_tests (self)
 
 get_default_tests (self)
 

Public Attributes

 engine_name
 
- Public Attributes inherited from searx.search.processors.abstract.EngineProcessor
 engine = engine
 
 engine_name = engine_name
 
 logger = engines[engine_name].logger
 
 suspended_status = SUSPENDED_STATUS.setdefault(key, SuspendedStatus())
 

Static Public Attributes

str engine_type = 'offline'
 

Protected Member Functions

 _search_basic (self, query, params)
 
- Protected Member Functions inherited from searx.search.processors.abstract.EngineProcessor
 _extend_container_basic (self, result_container, start_time, search_results)
 

Detailed Description

Processor class used by ``offline`` engines

Definition at line 9 of file offline.py.

Member Function Documentation

◆ _search_basic()

searx.search.processors.offline.OfflineProcessor._search_basic ( self,
query,
params )
protected

Definition at line 14 of file offline.py.

14 def _search_basic(self, query, params):
15 return self.engine.search(query, params)
16

References searx.search.processors.abstract.EngineProcessor.engine, searx.search.processors.online.OnlineProcessor.engine, and searx.search.processors.online_dictionary.OnlineDictionaryProcessor.engine.

Referenced by searx.search.processors.offline.OfflineProcessor.search(), and searx.search.processors.online.OnlineProcessor.search().

+ Here is the caller graph for this function:

◆ search()

searx.search.processors.offline.OfflineProcessor.search ( self,
query,
params,
result_container,
start_time,
timeout_limit )

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

Definition at line 17 of file offline.py.

17 def search(self, query, params, result_container, start_time, timeout_limit):
18 try:
19 search_results = self._search_basic(query, params)
20 self.extend_container(result_container, start_time, search_results)
21 except ValueError as e:
22 # do not record the error
23 self.logger.exception('engine {0} : invalid input : {1}'.format(self.engine_name, e))
24 except Exception as e: # pylint: disable=broad-except
25 self.handle_exception(result_container, e)
26 self.logger.exception('engine {0} : exception : {1}'.format(self.engine_name, e))

References searx.search.processors.offline.OfflineProcessor._search_basic(), searx.search.processors.online.OnlineProcessor._search_basic(), and searx.search.processors.abstract.EngineProcessor.extend_container().

+ Here is the call graph for this function:

Member Data Documentation

◆ engine_name

◆ engine_type

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

Definition at line 12 of file offline.py.


The documentation for this class was generated from the following file: