弹性搜索错误的响应搜索'IN'值

时间:2014-07-09 21:35:49

标签: elasticsearch

查询:

的http://:9200 / rif_orig / RIF / _search Q = F7Y *安培;从= 0&安培;大小= 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&安培;从= 0&安培;大小= 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'是保留字?我怎么能逃脱它。 我正在使用弹性搜索0.9已经过时但无法立即升级... 任何人都可以帮助我吗?

1 个答案:

答案 0 :(得分:1)

您使用的是哪种版本的Elasticsearch? " IN"是stop word,但默认情况下,在大于1.0的Elasticsearch版本中不会删除停用词。要么使用旧版本的Elasticsearch,要么删除了停用词。