remove unused imports and add logging
-import itertools
import logging
-from collections import defaultdict
from pprint import pformat
from rest_framework import generics, serializers
@@ -84,6 +82,8 @@ class PageSearchSerializer(serializers.Serializer):
v_new_list = [res.replace('\n', '. ') for res in v]
highlight[k] = v_new_list
+ log.debug('API Search highlight: %s', pformat(highlight))
+
return highlight
