match查询会先对搜索词进行分词,分词完毕后再逐个对分词结果进行匹配,相对于term的精确搜索,match是分词匹配搜索 两者查询的结果构成 query查出来的结果包括数据表里面符合条件的文档信息以及相关度得分(_score) filter查出来的结果要么是数据表里面符合条件的文档信息,要么为null,并且不会计算相关度得分 查询过程 这里以...
{ "value" : 6, "relation" : "eq" }, "max_score" : 0.18812019, "hits" : [ { "_index" : "people2", "_type" : "_doc", "_id" : "6", "_score" : 0.18812019, "_source" : { "title" : "Shane Shane Shane Connelly Connelly Connelly" } }, { "_index" : "people2", "...
"successful" : 1, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : { "value" : 2, "relation" : "eq" }, "max_score" : 2.2212896, "hits" : [ { "_index" : "demo", "_type" : "_doc", "_id" : "narolH0Byb0W9gti_JAl", "_score" : 2.2212896, "_source" :...
{"took": 36,"timed_out":false,"_shards": {"total": 5,"successful": 5,"skipped": 0,"failed": 0},"hits": {"total": 13832623,"max_score": 1,"hits": [ {"_index": "csc-pacific-case-monitor","_type": "case-monitor","_id": "36501235","_score": 1,"_source": {"caseId...
{ "took": 19, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 1, "max_score": 1, "hits": [ { "_index": "yx", "_type": "goods", "_id": "lNC7KYUB35ub5htYEZMU", "_score": 1, "_source":...
"max_score" : 1.0,//匹配到的最大分值"hits" :[//这里就是我们具体的搜索结果,是一个JSON文档数组] } } 2.query子句 query子句主要用来编写类似SQL的Where语句,支持布尔查询(and/or)、IN、全文搜索、模糊匹配、范围查询(大于小于)。 3.aggs子句 ...
{"took":2,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":10000,"relation":"gte"},"max_score":null,"hits":[]},"aggregations":{"dest":{"doc_count_error_upper_bound":0,"sum_other_doc_count":7605,"buckets":[{"key...
index中的单条记录称为document(文档),可以理解为表中的一行数据(本质差别在于document的存储方式上,它并不是行存储)。 多条document组成了一个index。 代码语言:txt 复制 "hits" : { "total" : { "value" : 140, "relation" : "eq" }, "max_score" : 1.0, ...
{ "took" : 10, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : 2, "max_score" : 1.0, "hits" : [ { "_index" : "product_info", "_type" : "products", "_id" : "WLvWYXAB8Rql5AUxLqUU...
在kibana可以通过API查询索引数据,命令如下:返回数据如下图所示:took:耗时几毫秒。time_out:是否超时。_shard:数据被拆到了5个分片上,搜索时使用了5个分片,5个分片都成功地返回了数据,失败了0个,跳过了0个。hits.total:查询结果的数量,3个document。max_score: