Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
2
Help us understand the problem. What is going on with this article?
@matyahiko2831

ElasticsearchでAND条件検索

More than 3 years have passed since last update.

ElasticsearchでAND条件検索。
boolとmustを使います。

凡例

GET index_name/type_name/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "FIELD名": {
              "value": "値"
            }
          }
        },
        {
          "term": {
            "FIELD名": {
              "value": "値"
            }
          }
        }
      ]
    }
  }
}

Elasticsearchを使い始めて日が浅いので、
SQLでいうところのコレってどうやるんだっけという問題にぶつかる。。。

2
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
matyahiko2831
インプットしたこと・考えたことを言語化する練習をしています!お気軽にコメントください♪

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
2
Help us understand the problem. What is going on with this article?