Match All Query

색인된 모든 문서를 검색한다. 가장 단순하다. 일반적으로 저장된 문서를 확인할 때 사용한다.

POST my_index/_search
{
    "query": {
        "match_all": {}
    }
}

Match Query

match 쿼리는 텍스트, 숫자, 날짜 등이 포함된 값을 분석기로 분석하여(형태소 분석 등) 매칭을 수행한다. 즉, full-text 검색을 수행한다.

POST my_index/_search
{
    "query": {
        "match": {
            "message": {
                "query": "this is a test"
            }
        }
    }
}

Multi Match Query

multi_match는 match 와 동일하지만 단일 필드가 아닌 여러 필드에 걸처 검색을 수행한다.

POST my_index/_search
{
    "query": {
        "multi_match": {
            "query": "this is a test",
            "fields": ["subject", "message"]
        }
    }
}