2014-06-08 5 views
3

임 #breakingbad 중 하나를 포함하는 모든 상태를 찾을 수 쿼리를 만들려고 또는탄성 검색 | 일치 여러 문구

여기

내가 지금까지 가지고 있지만, 의미에 따라 그 분명히 잘못된 것입니다 "나쁜 속보"

{ 
    "query": { 

     "match": { 

     "_all": { 

      "query": "breaking bad", 
      "type": "phrase" 
     } 
     }, 
     "match": { 
     "_all": { 
      "query": "#breakingbad", 
      "type": "phrase" 
     } 
    } 
} 
+0

bool 쿼리에 일치 검색어를 삽입 해 보았습니까? – l4rd

답변

3

답변 :

{ 
    "query": { 
     "bool": { 
      "should": [ 
       { 
        "match": { 
         "message": { 
          "query": "breaking bad", 
          "type": "phrase" 
         } 
        } 
       }, 
       { 
        "match": { 
         "message": "#poznasty" 
        } 
       } 
      ] 
     } 
    } 
} 
1

multi_match 사용하지