87def search(query, params) -> EngineResults:
92 _re = re.compile(
'.*{0}.*'.format(re.escape(query)), re.I | re.M)
95 query = _client.find({key: q}).skip((params[
'pageno'] - 1) * results_per_page).limit(results_per_page)
97 res.add(res.types.LegacyResult(number_of_results=query.count()))
100 kvmap = {str(k): str(v)
for k, v
in row.items()}
101 res.add(res.types.KeyValue(kvmap=kvmap))