2014-07-09 43 views
0

查詢:彈性搜索錯誤響應,搜索 'IN' 值

HTTP://:9200/rif_orig/RIF/_search Q = F7Y * &選自= O &大小= 10

響應:?

{ 
    "took": 4, 
    "timed_out": false, 
    "_shards": { 
    "total": 5, 
    "successful": 5, 
    "failed": 0 
    }, 
    "hits": { 
    "total": 1, 
    "max_score": 1.0, 
    "hits": [ 
     { 
     "_index": "rif_orig", 
     "_type": "rif", 
     "_id": "INF7YCOriginale", 
     "_score": 1.0, 
     "_source": { 
      "IDRIF": "INF7YCOriginale", 
      "R01PRO": "IN", 
      "R01RIF": "F7YC", 
      "R01DES": "CANDELA CHAMPION", 
      "R01PRE": "3.20", 
      "R01CPR": "", 
      "ARTPRO": "IN", 
      "ARTPAG": "1", 
      "ALTORG": "Originale", 
      "timestamp": "201407091018" 
     } 
     } 
    ] 
    } 
} 

查詢:

HTTP://:9200/rif_orig/RIF/_search q = IN &選自= O &大小= 10

響應:

{ 
    "took": 5, 
    "timed_out": false, 
    "_shards": { 
    "total": 5, 
    "successful": 5, 
    "failed": 0 
    }, 
    "hits": { 
    "total": 0, 
    "max_score": null, 
    "hits": [ 

    ] 
    } 
} 

我試圖Q = 「IN」,Q = R01PRO: 「IN」,Q = R01PRO:(IN)Q = R01PRO: 「\」 IN 「\」 相同結果.... 'IN'是保留字?我怎麼能逃脫它。 我使用elastich搜索0.9是舊的,但不能立即升級它... 任何人都可以幫助我嗎?

回答

1

您使用的是什麼版本的Elasticsearch? 「IN」是stop word,但在大於1.0的Elasticsearch版本中,默認情況下不會刪除停用詞。要麼使用舊版本的Elasticsearch,要麼已啓用停用詞的刪除。