# Terms查询

多词条查询允许匹配那些在内容中含有某些词条的文档。词条查询（term）查询允许匹配单个未经分析词条，多次条查询可以用来匹配多个这样的词条。假设interests字段中含有sing或dance的文档。

```
curl -XGET  'http://localhost:9200/oa/user/_search?pretty=true' -d '{
  "query": {
    "terms": {
      "interests":  ["sing", "dance"],
        "minimum_match": 1
      }
    }
  }
}'
```

上述查询返回在interests字段中包含一个或两个搜索词条文档。minimum\_match属性设置为１，则至少需要一个词条应该匹配。因为只有两个词条关键词，则可以设置minimum\_match属性设置为２，来查询匹配所有词条文档。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xiaoxiami.gitbook.io/myelasticsearch/query/basicquery/term-terms-wildcard/terms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
