Demo Offline Engine¶
Within this module we implement a demo offline engine. Do not look to close to the implementation, its just a simple example.
Configuration¶
To get in use of this demo engine add the following entry to your engines list
in settings.yml
:
- name: my offline engine
engine: demo_offline
shortcut: demo
disabled: false
Implementations¶
- searx.engines.demo_offline.CACHE: EngineCache¶
Persistent (SQLite) key/value cache that deletes its values after
expire
seconds.
- searx.engines.demo_offline.setup(engine_settings: dict[str, Any]) bool [source]¶
Dynamic setup of the engine settings.
The origin of this demo engine is a simple json string which is loaded in this example while the engine is initialized.
For more details see
searx.enginelib.Engine.setup
.
- searx.engines.demo_offline.init(engine_settings: dict[str, Any]) bool [source]¶
Initialization of the engine.
For more details see
searx.enginelib.Engine.init
.
- searx.engines.demo_offline.search(query: str, params: RequestParams) EngineResults [source]¶
Query (offline) engine and return results. Assemble the list of results from your local engine.
In this demo engine we ignore the ‘query’ term, usual you would pass the ‘query’ term to your local engine to filter out the results.