title: Elastic Search exact match query
body: <p>I want to construct a query which would be exactly match the attribute and accept multiple value for searching against the attribute.</p>
  
  <p>Currently I'm using following query to get data for single document.</p>
  
  <pre><code>query = {
      "match_phrase" : {
        "id" : "abc"
      }
  };
  </code></pre>
  
  <p>I want to match multiple values against the id attributes. Something like</p>
  
  <pre><code>query = {
      "match_phrase" : {
        "id" : ["abc", "xyz"]
      }
  };
  </code></pre>
  
  <p>I would like to know what is working equivalent of above query.</p>
  
  <pre><code>{
    "abc    " : {
      "mappings    " : {
        "keywordsearches    " : {
          "properties    " : {
            "keyword    " : {
              "type    " : "string    "
            },
            "module_name    " : {
              "type    " : "string    "
            },
            "timestamp    " : {
              "type    " : "date    ",
              "format    " : "dateOptionalTime    "
            }
          }
        },
        "npmmodules    " : {
          "properties    " : {
            "author    " : {
              "type    " : "string    "
            },
            "contributors    " : {
              "type    " : "string    "
            },
            "created_at    " : {
              "type    " : "date    ",
              "format    " : "dateOptionalTime    "
            },
            "curatedcontents    " : {
              "properties    " : {
                "description    " : {
                  "type    " : "string    "
                },
                "link    " : {
                  "type    " : "string    "
                }
              }
            },
            "curatedcontents_count    " : {
              "type    " : "long    "
            },
            "datachanged    " : {
              "type    " : "boolean    "
            },
            "dependencies    " : {
              "properties    " : {
                "name    " : {
                  "type    " : "string    "
                },
                "version    " : {
                  "type    " : "string    "
                }
              }
            },
            "description    " : {
              "type    " : "string    "
            },
            "downloads    " : {
              "properties    " : {
                "count    " : {
                  "type    " : "long    "
                },
                "day    " : {
                  "type    " : "date    ",
                  "format    " : "dateOptionalTime    "
                }
              }
            },
            "downloads_meta    " : {
              "properties    " : {
                "last_updated    " : {
                  "type    " : "date    ",
                  "format    " : "dateOptionalTime    "
                }
              }
            },
            "fork    " : {
              "type    " : "boolean    "
            },
            "full_name    " : {
              "type    " : "string    "
            },
            "gh_meta    " : {
              "properties    " : {
                "blacklist    " : {
                  "properties    " : {
                    "repo    " : {
                      "type    " : "string    "
                    },
                    "user    " : {
                      "type    " : "string    "
                    }
                  }
                },
                "etag    " : {
                  "type    " : "string    "
                },
                "last-modified    " : {
                  "type    " : "string    "
                }
              }
            },
            "git_url    " : {
              "type    " : "string    "
            },
            "homepage    " : {
              "type    " : "string    "
            },
            "html_url    " : {
              "type    " : "string    "
            },
            "id    " : {
              "type    " : "string    "
            },
            "keywords    " : {
              "type    " : "string    "
            },
            "latest    " : {
              "type    " : "string    "
            },
            "licenses    " : {
              "properties    " : {
                "MIT    " : {
                  "type    " : "string    "
                },
                "covers    " : {
                  "type    " : "string    "
                },
                "description    " : {
                  "type    " : "string    "
                },
                "file    " : {
                  "type    " : "string    "
                },
                "license    " : {
                  "type    " : "string    "
                },
                "link    " : {
                  "type    " : "string    "
                },
                "name    " : {
                  "type    " : "string    "
                },
                "type    " : {
                  "type    " : "string    "
                },
                "type:    " : {
                  "type    " : "string    "
                },
                "ur    " : {
                  "type    " : "string    "
                },
                "url    " : {
                  "type    " : "string    "
                },
                "version    " : {
                  "type    " : "string    "
                }
              }
            },
            "maintainers    " : {
              "type    " : "string    "
            },
            "name    " : {
              "type    " : "string    "
            },
            "npm_meta    " : {
              "properties    " : {
                "etag    " : {
                  "type    " : "string    "
                },
                "last-modified    " : {
                  "type    " : "date    ",
                  "format    " : "dateOptionalTime    "
                }
              }
            },
            "npm_stars    " : {
              "type    " : "long    "
            },
            "open_issues_count    " : {
              "type    " : "long    "
            },
            "pushed_at    " : {
              "type    " : "date    ",
              "format    " : "dateOptionalTime    "
            },
            "rank    " : {
              "type    " : "double    "
            },
            "readme    " : {
              "type    " : "string    "
            },
            "releases    " : {
              "properties    " : {
                "time    " : {
                  "type    " : "date    ",
                  "format    " : "dateOptionalTime    "
                },
                "version    " : {
                  "type    " : "string    "
                }
              }
            },
            "repository    " : {
              "properties    " : {
                "author    " : {
                  "type    " : "string    "
                },
                "bugs    " : {
                  "type    " : "string    "
                },
                "commit_date    " : {
                  "type    " : "date    ",
                  "format    " : "dateOptionalTime    "
                },
                "description    " : {
                  "type    " : "string    "
                },
                "dist    " : {
                  "type    " : "string    "
                },
                "git    " : {
                  "type    " : "string    "
                },
                "github    " : {
                  "type    " : "string    "
                },
                "handle    " : {
                  "type    " : "string    "
                },
                "homepage    " : {
                  "type    " : "string    "
                },
                "id_string    " : {
                  "type    " : "string    "
                },
                "job    " : {
                  "type    " : "string    "
                },
                "main    " : {
                  "type    " : "string    "
                },
                "path    " : {
                  "type    " : "string    "
                },
                "private    " : {
                  "type    " : "string    "
                },
                "repository    " : {
                  "type    " : "string    "
                },
                "revision    " : {
                  "type    " : "string    "
                },
                "static    " : {
                  "type    " : "string    "
                },
                "title    " : {
                  "type    " : "string    "
                },
                "tyep    " : {
                  "type    " : "string    "
                },
                "typ    " : {
                  "type    " : "string    "
                },
                "type    " : {
                  "type    " : "string    "
                },
                "type:    " : {
                  "type    " : "string    "
                },
                "update    " : {
                  "type    " : "string    "
                },
                "ur    " : {
                  "type    " : "string    "
                },
                "url    " : {
                  "type    " : "string    "
                },
                "web    " : {
                  "type    " : "string    "
                },
                "web     " : {
                  "type    " : "string    "
                }
              }
            },
            "rev    " : {
              "type    " : "string    "
            },
            "stargazers_count    " : {
              "type    " : "long    "
            },
            "subscribers_count    " : {
              "type    " : "long    "
            },
            "updated_at    " : {
              "type    " : "date    ",
              "format    " : "dateOptionalTime    "
            },
            "userreviews    " : {
              "properties    " : {
                "review    " : {
                  "type    " : "string    "
                },
                "timestamp    " : {
                  "type    " : "date    ",
                  "format    " : "dateOptionalTime    "
                }
              }
            },
            "version    " : {
              "type    " : "string    "
            },
            "watchers_count    " : {
              "type    " : "long    "
            }
          }
        },
        "npmusers    " : {
          "properties    " : {
            "blog    " : {
              "type    " : "string    "
            },
            "created_at    " : {
              "type    " : "date    ",
              "format    " : "dateOptionalTime    "
            },
            "email    " : {
              "type    " : "string    "
            },
            "followers    " : {
              "type    " : "long    "
            },
            "following    " : {
              "type    " : "long    "
            },
            "gh_meta    " : {
              "properties    " : {
                "blacklist    " : {
                  "properties    " : {
                    "user    " : {
                      "type    " : "string    "
                    }
                  }
                },
                "etag    " : {
                  "type    " : "string    "
                },
                "last-modified    " : {
                  "type    " : "string    "
                }
              }
            },
            "github    " : {
              "type    " : "string    "
            },
            "html_url    " : {
              "type    " : "string    "
            },
            "id    " : {
              "type    " : "string    "
            },
            "name    " : {
              "type    " : "string    "
            },
            "npm_meta    " : {
              "properties    " : {
                "etag    " : {
                  "type    " : "string    "
                },
                "last-updated    " : {
                  "type    " : "date    ",
                  "format    " : "dateOptionalTime    "
                }
              }
            },
            "public_gists    " : {
              "type    " : "long    "
            },
            "public_repos    " : {
              "type    " : "long    "
            },
            "type    " : {
              "type    " : "string    "
            },
            "updated_at    " : {
              "type    " : "date    ",
              "format    " : "dateOptionalTime    "
            }
          }
        }
      }
    }
  }
  </code></pre>