Skip to content

Commit b99025a

Browse files
committed
services: include Opensearch meta in the results
* Sometimes, keys relevant to the serialization process are not included inside ``_source``, i.e. "highlight." By adding ``hit.meta`` as part of the serializer context, we make them available without the risk of name collision.
1 parent 3ba12c4 commit b99025a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

invenio_requests/services/events/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def hits(self):
5151
context=dict(
5252
identity=self._identity,
5353
record=record,
54+
meta=hit.meta,
5455
),
5556
)
5657

invenio_requests/services/requests/results.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def hits(self):
150150
context={
151151
"identity": self._identity,
152152
"record": request,
153+
"meta": hit.meta,
153154
},
154155
)
155156

0 commit comments

Comments
 (0)