Nested query in elasticsearch

前端 未结 1 1840
我在风中等你
我在风中等你 2021-01-03 14:03

Im having problem getting a nested query working with elasticsearch (If i remove one of the query-strings it works). the problem I am trying to solve is that i have a docume

相关标签:
1条回答
  • 2021-01-03 14:43

    Your query is not a valid query. You need to use a proper compound query to combine other queries together, you can't just use a comma and add another query where only one is supported.

    You can for instance use a bool query and have two must clauses, pretty much your two query_string. Or maybe you can even switch to using filters, and have a filtered query. I'd have a look at the examples on this article: http://www.spacevatican.org/2012/6/3/fun-with-elasticsearch-s-children-and-nested-documents/.

    0 讨论(0)
提交回复
热议问题