Import from mysql doesn't create index
See original GitHub issueHi,
I’m running following script in order to synchronyse artists table from mysql with artists index in elasticsearch but, after execution nothing appears in index as well as index itself: `` `bin=/root/elasticsearch-jdbc-2.2.0.1/bin lib=/root/elasticsearch-jdbc-2.2.0.1/lib
echo ‘{
“type” : “jdbc”,
“jdbc” : {
“url” : “jdbc:mysql://localhost:3306/databasename”,
“user” : “user”,
“password” : “Password”,
“sql” : “select artistid as _id, artist_name, link, short_artist_name from artists”,
“index” : “artists”,
“type” : “artist”
}
}’ | java
-cp “${lib}/*”
-Dlog4j.configurationFile=${bin}/log4j2.xml
org.xbib.tools.Runner
org.xbib.tools.JDBCImporter`
curl ‘http://localhost:9200/_cat/indices?v’ returns health status index pri rep docs.count docs.deleted store.size pri.store.size
Please advise what do I do wrong?
Configuration: elasticsearch-jdbc-2.2.0.1 java version “1.8.0_77” elasticsearch 2.3.0 Java™ SE Runtime Environment (build 1.8.0_77-b03) Java HotSpot™ 64-Bit Server VM (build 25.77-b03, mixed mode) mysql Ver 14.14 Distrib 5.6.28, for debian-linux-gnu (x86_64) using EditLine wrapper
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
You can add cluster name like this
The content for “post_status = ? and post_modified > ?” is from “parameter”: [“publish”, “$metrics.lastexecutionstart”]}, just run my_scripts.sh is enough.