用于获取特定范围元素的 Elasticsearch 自定义查询?

Elasticsearch custom query for getting elements of particular range?

我是 Elasticsearch 的新手,所以,这是我的疑问:

I have large data inserted into Elastic search. The data that I have inserted contains an attribute of marks of each subject, is it possible to write an Elasticsearch query to find the number of students who has their marks in the inputted range.

示例:

|studentname | maths | computers |
++++++++++++++++++++++++++++++++++
|s1          |78     |90         |
==================================
|s2          |56     |75         |
==================================
|s3          |45     |50         |
==================================

假设ES中的数据以表格形式出现,是否可以

1.Find the list of students who has scored more than 50 marks in computers.

2.Find the list of students who has scored more than 60 marks in both subjects.

使用范围查询:-

{  
   "query":{"bool":{"must":{"range":{computers:{gte: 50} }}}}
}

勾选这个link