0

I was using the below query to find out student's details from an elastic search index ( ES Version 2.6 ). Multiple student IDs (max 50 Nos.) were passed to this query so that it brings out the details

{ "size": 5000, "_source": false, "fields": ["student_name","age", "mobile","pincode","library_id"], "query": { "filtered": { "query": { "bool": { "must": [ { "terms": {"student_id": ['124,563,222']} } ] } } } } }

This is not working in ES 5.6 . Could someone help me understand how to translate this to version 5.6 ? Any useful links also would be fine. Thanks

Sss
  • 1
  • 1
  • this answer may help: https://stackoverflow.com/questions/40519806/no-query-registered-for-filtered/40521602#40521602 – Val Jul 30 '18 at 10:57
  • Thanks. But this is a different use case. – Sss Aug 02 '18 at 07:14
  • No that's the same issue, `filtered` query have been removed in ES 5 so you can simply move the `bool` query to the top-level. – Val Aug 02 '18 at 07:17
  • Ohk. Will check it out. Thanks @Val – Sss Aug 03 '18 at 09:33

0 Answers0