Lucene专注于搜索底层的建设,而Elasticsearch专注于企业应用。
 1 GET xxx/_search
 2 {
 3   "query": {
 4     "bool": {
 5       "must": [
 6         {"term": {
 7           "host.name": {
 8             "value": "xxx"
 9           }
10         }},
11         {"term": {
12           "source": {
13             "value": "/var/log/hadoop-yarn/container/application_1560003017722_1114/container_e05_1560003017722_1114_01_000020/taskmanager.log"
14           }
15         }},
16         {"range": {
17           "@timestamp": {
18             "gte": 1560000017722,
19             "lte": 1560005017722
20           }
21         }}
22       ]
23     }
24   },
25   "size": 100
26 }
参考:查询和过滤器上下文
原文:https://www.cnblogs.com/lcmichelle/p/11449196.html