gpt4 book ai didi

Elasticsearch 错误 : MapperParsingException failed to parse

转载 作者:行者123 更新时间:2023-11-29 02:54:44 25 4
gpt4 key购买 nike

我正在尝试将 MYSQL 集成到 Windows 7 上的 ElasticSearch 中 link

我已经完成了以下步骤:

1:

Download & Unzip in C Directory https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.4.zip

2:

Run this command on CMD ./bin/plugin --install jdbc --url http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-river-jdbc/1.3.4.4/elasticsearch-river-jdbc-1.3.4.4-plugin.zip

3:

Download MYSQL Connector mysql-connector-java-5.1.33.zip from MYSQL website.

Unzip and copy mysql-connector-java-5.1.33-bin.jar file.

Place it into C:\elasticsearch-1.3.4\plugins\jdbc

我已经检查了现在插件目录中有两个文件

  • elasticsearch-river-jdbc-1.3.4.4.jar

  • mysql-connector-java-5.1.33-bin

现在我尝试在 CMD 上执行这个命令,但出现错误

curl -XPUT 'localhost:9200/_river/jdbc-1.3.4.4-d2e33c3/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "root",
"password" : "pass",
"sql" : "select * from abc"
}
}'

{
"error": "MapperParsingException[failed to parse]; nested: JsonParseException[Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: [B@3cf756; line: 1, column:2]]; ",
"status": 400
}

curl: (6) Could not resolve host: type; Host not found

curl: (6) Could not resolve host: :; No data record of requested type

curl: (6) Could not resolve host: jdbc,jdbc; No data record of requested type

curl: (6) Could not resolve host: :; No data record of requested type

curl: (3) [globbing] unmatched brace at pos 5

curl: (6) Could not resolve host: :; No data record of requested type

curl: (6) Could not resolve host: jdbc:mysql:; No data record of requested type

curl: (6) Could not resolve host: :; No data record of requested type

curl: (6) Could not resolve host: root,password; No data record of requested typ
e
curl: (6) Could not resolve host: :; No data record of requested type

curl: (6) Could not resolve host: pass,sql; No data record of requested type

curl: (6) Could not resolve host: :; No data record of requested type

curl: (6) Could not resolve host: select * from abc; No data record of requested type

MYSQL(5.5.37) Database (test) contains just one table (abc) with two columns id(pk) and address (varchar)

我正在使用这个 jdbc-1.3.4.4-d2e33c3 名称作为 jdbc 驱动程序。我从这个链接得到这个名字。

http://localhost:9200/_nodes?settings=true&pretty=true

我已经搜索过了,但找不到任何与 mysql 集成相关的问题。

我的问题是仍然缺少任何东西,或者我的设置有误。?

最佳答案

在 Windows 上, curl 的行为不同。尝试使用curl -XPUT "http://127.0.0.1:9200/index/type/id"-d "{ """attribute""": """name"""}".试试用那些三重引号

关于 Elasticsearch 错误 : MapperParsingException failed to parse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27355553/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com