Skip to content
Snippets Groups Projects
Commit 7c2ff8c8 authored by Erik Johnston's avatar Erik Johnston
Browse files

Merge pull request #405 from matrix-org/erikj/search-ts

Change the result dict to be a list in /search response
parents 219027f5 71578e2b
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ class SearchHandler(BaseHandler):
defer.returnValue({
"search_categories": {
"room_events": {
"results": {},
"results": [],
"count": 0,
"highlights": [],
}
......@@ -348,16 +348,14 @@ class SearchHandler(BaseHandler):
# We're now about to serialize the events. We should not make any
# blocking calls after this. Otherwise the 'age' will be wrong
results = {
e.event_id: {
results = [
{
"rank": rank_map[e.event_id],
"result": serialize_event(e, time_now),
"context": contexts.get(e.event_id, {}),
}
for e in allowed_events
}
logger.info("Found %d results", len(results))
]
rooms_cat_res = {
"results": results,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment