2016-06-21 114 views
0

我在Ubuntu 16.04上使用ElasticSearch 2.3.1。爲什麼ElasticSearch沒有顯示分數?

的映射是:

{ 
    "settings": { 
     "analysis": { 
      "filter": {    
       "2gramsto3_filter": { 
        "type":  "ngram", 
        "min_gram": 2, 
        "max_gram": 3 
       }     
      },   
      "analyzer": { 
       "2gramsto3": { 
        "type":  "custom", 
        "tokenizer": "standard", 
        "filter": [ 
         "lowercase", 
         "2gramsto3_filter" 
        ] 
       } 
      } 
     } 
    }, 
    "mappings": { 
     "agents": { 
      "properties": {        
       "presentation": { 
        "type": "string", 
        "analyzer": "2gramsto3"     
       }, 
       "cv": { 
        "type": "string", 
        "analyzer": "2gramsto3"     
       } 
     } 
    } 
} 

查詢是:

{ 
    "size": 20, 
    "from": 0, 
    "query": { 
    "bool": { 
     "filter": [ 
     { 
      "bool": { 
      "must": [ 
       [ 
       { 
        "match": { 
        "cv": "folletto" 
        } 
       }, 
       { 
        "match": { 
        "cv": " psicologia" 
        } 
       }, 
       { 
        "match": { 
        "cv": " tenacia" 
        } 
       } 
       ] 
      ] 
      } 
     } 
     ] 
    } 
    } 
} 

它發現14567個文檔,但比分是總是"_score": 0

我讀了過濾器有得分,所以,爲什麼不在這種情況下?

謝謝!

回答