Query and filter context
Match All Query
最简单的search请求,匹配所有文档,文档的_score值都是1,示例:
get twitter/_search
{
"query": {
"match_all": {}
}
}
可以使用boost改变文档的_score值,示例:
get twitter/_search
{
"query": {
"match_all": { "boost" : 1.2 }
}
}
这样,所有文档的_score值都变为了1.2。
Full text queries
The high-level full text queries are usually used for running full text queries on full text fields like the body of an email. They understand how the field being queried is analyzed and will apply each field’sanalyzer
(or search_analyzer
) to the query string before executing.
全文本检索经常用在text字段上,比如email