diff options
author | Erik Johnston <erik@matrix.org> | 2015-12-08 16:15:27 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-12-08 16:15:27 +0000 |
commit | 7c2ff8c8899f95ace66ab9c1a6bd88bc9eca7e03 (patch) | |
tree | 49995c74aa6467395fd812dc1c8986e9db104eb1 /synapse/handlers | |
parent | Merge pull request #429 from matrix-org/markjh/db_counters (diff) | |
parent | Change the result tict to be a list (diff) | |
download | synapse-7c2ff8c8899f95ace66ab9c1a6bd88bc9eca7e03.tar.xz |
Merge pull request #405 from matrix-org/erikj/search-ts
Change the result dict to be a list in /search response
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/search.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/handlers/search.py b/synapse/handlers/search.py index 65ef2f85bf..bc79564287 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": [], } @@ -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, |