Multiple Index Using JDBC River (MYSQL)


(samaswin) #1

Hello,
I have used it successfully for indexing a single
collection using JDBC river. However, I can't figure out how to index
multiple
collections from mysql.

This works for a single collection:
curl -XPUT 'http://localhost:9200/_river/employee/_meta' -d '{
"type": "jdbc",
"jdbc": {
"driver": "com.mysql.jdbc.Driver",
"url": "jdbc:mysql://localhost:3306/projectdb",
"user": "root",
"password": "root",
"sql": "select id, name from employee"
},
"index": {
"name": "employee_idx",
"type": "jdbc"
}
}'

When I add another collection for indexing using the following
command:
curl -XPUT 'http://localhost:9200/_river/jobdetails/_meta' -d '{
"type": "jdbc",
"jdbc": {
"driver": "com.mysql.jdbc.Driver",
"url": "jdbc:mysql://localhost:3306/projectdb",
"user": "root",
"password": "root",
"sql": "select id, name from jobdetails"
},
"index": {
"name": "jobdetails_idx",
"type": "jdbc"
}
}'
Nothing happens and the second index is not created. I am using the latest
version of the river from github on ES 0.90. No Error in logs.
Can any one help me regarding this. I am new in this. I need this immediately.


(Jörg Prante) #2

Is there anything in the logs?

Probably there is a typo in "jdbc:mysql://1localhost:3306/projectdb" -
isn't it 'localhost'?

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(samaswin) #3

yes that is localhost only. Otherwise the first index won't create wright. The logs don't show any error message or warnings.
Thanks,
R Ashwin


(samaswin) #4

Finally I resolved the problem. Now I can create multiple types.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(psspl) #5

Hello,

How do you resolve your issue of using multiple index using river. From your answer I can get that you are using multiple types not multiple index. I want to use multiple index. Can someone please suggest me how to achieve this?


(system) #6