summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-12-01 14:48:35 +0000
committerErik Johnston <erik@matrix.org>2015-12-01 14:48:35 +0000
commit71578e2bf255ca434edbafd3919aa56c3ebf1b48 (patch)
tree295903f5f0111bc30731eddbabb8945338eb5693 /synapse
parentTidy up a bit (diff)
downloadsynapse-71578e2bf255ca434edbafd3919aa56c3ebf1b48.tar.xz
Change the result tict to be a list
Diffstat (limited to '')
-rw-r--r--synapse/handlers/search.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/handlers/search.py b/synapse/handlers/search.py
index df6390cf05..0e58404148 100644
--- a/synapse/handlers/search.py
+++ b/synapse/handlers/search.py
@@ -135,7 +135,7 @@ class SearchHandler(BaseHandler):
             defer.returnValue({
                 "search_categories": {
                     "room_events": {
-                        "results": {},
+                        "results": [],
                         "count": 0,
                         "highlights": [],
                     }
@@ -339,16 +339,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,