mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 22:00:22 +00:00
Change the result tict to be a list
This commit is contained in:
parent
da7dd58641
commit
71578e2bf2
1 changed files with 4 additions and 6 deletions
|
@ -135,7 +135,7 @@ class SearchHandler(BaseHandler):
|
||||||
defer.returnValue({
|
defer.returnValue({
|
||||||
"search_categories": {
|
"search_categories": {
|
||||||
"room_events": {
|
"room_events": {
|
||||||
"results": {},
|
"results": [],
|
||||||
"count": 0,
|
"count": 0,
|
||||||
"highlights": [],
|
"highlights": [],
|
||||||
}
|
}
|
||||||
|
@ -339,16 +339,14 @@ class SearchHandler(BaseHandler):
|
||||||
# We're now about to serialize the events. We should not make any
|
# We're now about to serialize the events. We should not make any
|
||||||
# blocking calls after this. Otherwise the 'age' will be wrong
|
# blocking calls after this. Otherwise the 'age' will be wrong
|
||||||
|
|
||||||
results = {
|
results = [
|
||||||
e.event_id: {
|
{
|
||||||
"rank": rank_map[e.event_id],
|
"rank": rank_map[e.event_id],
|
||||||
"result": serialize_event(e, time_now),
|
"result": serialize_event(e, time_now),
|
||||||
"context": contexts.get(e.event_id, {}),
|
"context": contexts.get(e.event_id, {}),
|
||||||
}
|
}
|
||||||
for e in allowed_events
|
for e in allowed_events
|
||||||
}
|
]
|
||||||
|
|
||||||
logger.info("Found %d results", len(results))
|
|
||||||
|
|
||||||
rooms_cat_res = {
|
rooms_cat_res = {
|
||||||
"results": results,
|
"results": results,
|
||||||
|
|
Loading…
Reference in a new issue