Elasticsearch入门 互动版

在线工具推荐: Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器

Match Query


  比如我们要查询索引为twitter,索引类型为tweetuserkimchy的文档记录。

curl -XGET  'http://localhost:9200/twitter/tweet/_search'  -d '
{
  "query" :
  {
      "match":{"user":"kimchy"}
  }
}'

  Match Query也还包括一些其它的参数:_query、operator、zero_termsquery

{
  "query" :
  {
      "match":{
      "user":"kimchy",
      "message":{
                 "query" : "this is a test",
                 "operator" : "and"
                 }
              }
   }
}
match来查询索引为twitter,索引类型为tweetuserkimchy的文档记录。