建议者停止工作,然后从事娱乐活动

时间:2019-04-07 19:19:53

标签: elasticsearch elasticsearch-6

我有一项自动完成服务,该服务似乎可以工作几天,然后在使用几天后返回:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "parsing_exception",
        "reason" : "Unknown key for a START_OBJECT in [completion_suggest].",
        "line" : 1,
        "col" : 23
      }
    ],
    "type" : "parsing_exception",
    "reason" : "Unknown key for a START_OBJECT in [completion_suggest].",
    "line" : 1,
    "col" : 23
  },
  "status" : 400
}

查询:

curl localhost:9200/myac/_search?pretty -d '{"completion_suggest":{"song-suggest":{"prefix":"nir","completion":{"field":"completion_suggest"}}}}' -H'Content-Type: application/json'

映射:

{
    "mappings": {
        "query": {
            "dynamic": "strict",
            "properties": {
                "completion_suggest": {
                    "type": "completion",
                    "analyzer": "simple",
                    "search_analyzer": "simple",
                    "preserve_separators": true,
                    "preserve_position_increments": true,
                    "max_input_length": 20
                }
            }
        }
    }
}

索引甚至不是很大。...大约只有5000个字词。其他ES索引正常运行,这是唯一似乎中断的索引。如果删除索引重新映射并添加术语,则它将再次工作几天,然后再次中断。我正在运行6.2.4版。

编辑: 如果我只是删除并重新创建索引,则它可以正常工作,但每2-3天就会厌倦这样做。

0 个答案:

没有答案