0
votes

How to make OR query (using django-elasticsearch-dsl-drf) with multiple contains statements? Query in words: Search for objects where title contains "hello" OR description contains "world"

I can't find about it in documentation: https://django-elasticsearch-dsl-drf.readthedocs.io/en/0.3.12/advanced_usage_examples.html#usage-example

1
its been quite some time would be great if you can upvote and accept answer so that its more useful for the community, also it motivates us to help the community - user156327

1 Answers

1
votes

what you need is boolean query with should clause, its very easy to construct in JSON format, and validate the search results.

For Django, although I am not familiar, this page of queries DSL and specifically this sub-section should fix your issue.