diff --git a/activities/services/search.py b/activities/services/search.py index b8dcae6..bb01eb6 100644 --- a/activities/services/search.py +++ b/activities/services/search.py @@ -127,7 +127,9 @@ class SearchService: """ Searches for posts on an identity via full text search """ - return self.identity.posts.filter(content__search=self.query)[:50] + return self.identity.posts.unlisted(include_replies=True).filter( + content__search=self.query + )[:50] def search_all(self): """ diff --git a/activities/views/debug.py b/activities/views/debug.py index d93190e..9cb4393 100644 --- a/activities/views/debug.py +++ b/activities/views/debug.py @@ -56,7 +56,8 @@ class JsonViewer(FormView): except json.JSONDecodeError as ex: result = str(ex) else: - result = json.dumps(document, indent=4, sort_keys=True) + context["raw_result"] = json.dumps(response.json(), indent=2) + result = json.dumps(document, indent=2, sort_keys=True) # result = pprint.pformat(document) context["result"] = result return self.render_to_response(context) diff --git a/templates/activities/debug_json.html b/templates/activities/debug_json.html index 387ed13..18ded5e 100644 --- a/templates/activities/debug_json.html +++ b/templates/activities/debug_json.html @@ -56,10 +56,7 @@ else set my.innerText to 'Hide' ">Show -
{{ raw_result }}