Elasticsearch 查询使用

来源:互联网 发布:数字软件下载 编辑:程序博客网 时间:2024/05/19 19:42

Terms Queryedit

Filters documents that have fields that match any of the provided terms (not analyzed). For example:

{    "ids" : {        "type" : "my_type",        "values" : ["1", "4", "100"]    }} 查询id 为 1 ,4 ,100 


{    "constant_score" : {        "filter" : {            "terms" : { "user" : ["kimchy", "elasticsearch"]}        }    }}针对 not analyzed  准确查询
{    "constant_score" : {        "filter" : {            "missing" : { "field" : "user" }        }    }} 查询字段user 不存在的 document
0 0
原创粉丝点击