59def search(query: str, params: dict[str, t.Any]) -> EngineResults:
60 """Query (offline) engine and return results. Assemble the list of results
61 from your local engine. In this demo engine we ignore the 'query' term,
62 usual you would pass the 'query' term to your local engine to filter out the
67 count: int = CACHE.get(
"count", 0)
68 data_rows: list[dict[str, str]] = json.loads(_my_offline_engine)
74 'language': params[
'searxng_locale'],
75 'value': row.get(
"value"),
79 caption=f
"Demo Offline Engine Result #{count}",
85 res.add(res.types.LegacyResult(number_of_results=count))
88 CACHE.set(
"count", count, expire=20)