我在查询elasticsearch时收到错误 - [模糊]查询不支持[模糊]
curl -XGET "http://localhost:9200/searches_development_20140329164207570/search_term/_search/?pretty=true" -d '{
"query": {
"fuzzy": {
"displayname": {
"value": "altanta",
"fuzziness": 2
}
}
}
}'
检查查询DSL这是执行模糊查询的正确方法http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-fuzzy-query.html
我不能立即明白我做错了什么 - 如果我删除了“错误”。选项,查询验证但根据文档支持。为什么抛出异常?
以下是我希望在https://gist.github.com/lfender6445/b4fba20c2736a017584e
上匹配的一些示例数据以下是完整的错误消息:
{
"error" : "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[1daKAcneQXeFsEfxPwKEmg][searches_development_20140329164207570][4]: SearchParseException[[searches_development_20140329164207570][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n\"query\": {\n \"fuzzy\": {\n \"displayname\": {\n \"value\": \"altanta\",\n \"fuzziness\": 2\n }\n }\n}\n}]]]; nested: QueryParsingException[[searches_development_20140329164207570] [fuzzy] query does not support [fuzziness]]; }{[1daKAcneQXeFsEfxPwKEmg][searches_development_20140329164207570][2]: SearchParseException[[searches_development_20140329164207570][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n\"query\": {\n \"fuzzy\": {\n \"displayname\": {\n \"value\": \"altanta\",\n \"fuzziness\": 2\n }\n }\n}\n}]]]; nested: QueryParsingException[[searches_development_20140329164207570] [fuzzy] query does not support [fuzziness]]; }{[1daKAcneQXeFsEfxPwKEmg][searches_development_20140329164207570][3]: SearchParseException[[searches_development_20140329164207570][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n\"query\": {\n \"fuzzy\": {\n \"displayname\": {\n \"value\": \"altanta\",\n \"fuzziness\": 2\n }\n }\n}\n}]]]; nested: QueryParsingException[[searches_development_20140329164207570] [fuzzy] query does not support [fuzziness]]; }{[1daKAcneQXeFsEfxPwKEmg][searches_development_20140329164207570][0]: SearchParseException[[searches_development_20140329164207570][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n\"query\": {\n \"fuzzy\": {\n \"displayname\": {\n \"value\": \"altanta\",\n \"fuzziness\": 2\n }\n }\n}\n}]]]; nested: QueryParsingException[[searches_development_20140329164207570] [fuzzy] query does not support [fuzziness]]; }{[1daKAcneQXeFsEfxPwKEmg][searches_development_20140329164207570][1]: SearchParseException[[searches_development_20140329164207570][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\n\"query\": {\n \"fuzzy\": {\n \"displayname\": {\n \"value\": \"altanta\",\n \"fuzziness\": 2\n }\n }\n}\n}]]]; nested: QueryParsingException[[searches_development_20140329164207570] [fuzzy] query does not support [fuzziness]]; }]",
"status" : 400
}
elasticsearch -v
Version: 0.90.11, Build: 11da1ba/2014-02-03T15:27:39Z, JVM: 1.6.0_65
答案 0 :(得分:0)
通过升级到ES 1.1.1