barseghyanartur / graphene-elastic

Graphene Elasticsearch/OpenSearch (DSL) integration
https://pypi.org/project/graphene-elastic/
71 stars 17 forks source link

[Question] How does one filter on nested document fields? #33

Closed petroslamb closed 4 years ago

petroslamb commented 4 years ago

I was looking on how to filter on nested document fields, any idea on how to go about it?

barseghyanartur commented 4 years ago

@petroslamb:

It's not yet implemented in this package. You will have to make a custom backend for it and write some tiny parts of the code, alongside proper Document definition.

However, for inspiration, you could use these docs and these code samples:

And certainly, the most advanced example for nested filtering:

If you come up with something useful (and reusable), do not hesitate to make a contribution. :)

barseghyanartur commented 4 years ago

@petroslamb:

P. S.

Just in case, if you have budget for external help (or willing to sponsor some features), mail me.

petroslamb commented 4 years ago

@barseghyanartur

Sorry for not closing the ticket sooner!

Thank you for your swift and excellent reply, a GraphQL solution may be implemented later in the year after all and I will contact you if I can find a way to budget it.