58def search(query, request_params) -> EngineResults:
59 """Query (offline) engine and return results. Assemble the list of results
60 from your local engine. In this demo engine we ignore the 'query' term,
61 usual you would pass the 'query' term to your local engine to filter out the
65 count = CACHE.get(
"count", 0)
67 for row
in json.loads(_my_offline_engine):
71 'language': request_params[
'searxng_locale'],
72 'value': row.get(
"value"),
76 caption=f
"Demo Offline Engine Result #{count}",
82 res.add(res.types.LegacyResult(number_of_results=count))
85 CACHE.set(
"count", count, expire=20)