Skip to content

Commit 59e30dd

Browse files
committed
Feedback | added algorithm in search meta
1 parent cd046b6 commit 59e30dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/common/serializers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,15 @@ class SearchResultSerializer(Serializer): # pylint: disable=abstract-method
178178
search_highlight = SerializerMethodField()
179179

180180
class Meta:
181-
fields = ('search_score', 'search_confidence', 'search_highlight', 'match_type')
181+
fields = ('search_score', 'search_confidence', 'search_highlight', 'match_type', 'algorithm')
182182

183183
def to_representation(self, instance):
184184
rep = super().to_representation(instance)
185185

186186
if not rep.get('match_type', None):
187187
rep.pop('match_type', None)
188+
if not rep.get('algorithm', None):
189+
rep.pop('algorithm', None)
188190

189191
return rep
190192

0 commit comments

Comments
 (0)