-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose metadata also in .filter() results #279
Comments
I don't think this is possible. If you want the metadata, why not use
search()?
…On Tue, 15 Sep 2020 at 14:39, valentijnscholten ***@***.***> wrote:
Currently when using .search() you can access the metadata of each
searchresult using result.meta['xxxx'] or result.meta.xxxx.
When using .filter() on en existing queryset, this metadata is not
exposed. Would be helpful to access the metadata here as it could contain
data not available in the queryset models or the result of some expensive
calculation performed during indexing.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#279>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABEKCCGGU6RIZ536DOH6GDSF5U7BANCNFSM4RNE2SOQ>
.
|
the I need to perform some filtering and prefetching before performing the full text search. |
The metadata is saved as a json-encoded blob. It could possibly be attached
to the model using ".annotate()", but it would be attached as a string,
rather than a dictionary. I can't see a way to improve on this.
…On Tue, 15 Sep 2020 at 18:03, valentijnscholten ***@***.***> wrote:
the watson_rank is exposed, so meta could be exposed to (as dictionary)?
I need to perform some filtering and prefetching before performing the
full text search.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#279 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABEKCG6H6VGCOFRHT5YMGDSF6M5ZANCNFSM4RNE2SOQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently when using
.search()
you can access the metadata of each searchresult usingresult.meta['xxxx']
orresult.meta.xxxx
.When using
.filter()
on en existing queryset, this metadata is not exposed. Would be helpful to access the metadata here as it could contain data not available in the queryset models or the result of some expensive calculation performed during indexing.The text was updated successfully, but these errors were encountered: