2015-12-05 37 views
0

我正在使用ES 2.0。我有以下過濾查詢與multi_match如何使用Multi_Match將已過濾的查詢轉換爲通用條款的已過濾查詢

{ 
    "filtered" : { 
     "query": { 
       "multi_match" : { 
        "query" : "sleep", 
        "fields" : ["title.*^10","introduction.*"], 
        "cutoff_frequency" : 0.001, 
        "operator" : "or", 
        "analyzer" : "standard" 
       } 
     }, 
     "filter" : { 
      ... 
     } 
} 

因爲停用詞的問題,我想,以取代Multi_Match與通用條款解釋這裏:https://www.elastic.co/blog/stop-stopping-stop-words-a-look-at-common-terms-query

我怎能代替上面multi_match與普通條款?我無法弄清楚如何處理基於常用術語的多個領域的搜索。

謝謝!

回答

1

當你multi_match查詢指定cutoff_frequency,你已經在使用的常用術語,如博客文章中提到您鏈接到:

「通用條款也被納入匹配查詢並能 通過設置cutoff_frequency爲值0.001" 像

的文檔matchmulti_matchcutoff_frequency啓用也提到了這一事實。

+0

Val,感謝您的輸入!乾杯。 – curious1

+0

沒有問題,總是樂於幫忙! – Val