How to access river?


(Bibero) #1

Hi,
I'm new to elasticsearch, so my problem is very basic. I'm trying to access
oracle database via river object. I've already created two different rivers
on elasticsearch server, but I have no idea how to access them. Here is the
list of my rivers:

D:>curl -X POST http://localhost:9200/_river/_search?pretty&q=*
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 6,
"max_score" : 1.0,
"hits" : [ {
"_index" : "_river",
"_type" : "my_river_1",
"_id" : "_meta",
"_score" : 1.0, "_source" : { "type" : "jdbc", "jdbc" : {
"driver" : "oracle.jdbc.OracleDriver", "url" :
"jdbc:oracle:thin:@//hostname:1521/service", "user" : "username",
"password" : "userpass", "sql" : "select 1 from dual" }}
}, {
"_index" : "_river",
"_type" : "my_river_1",
"_id" : "_status",
"_score" : 1.0, "_source" :
{"ok":true,"node":{"id":"1IPVVy9uRa2u7mRVlPZrKA","name":"Nathaniel
Essex","transport_address":"inet[/10.132.7.185:9300]"}}
}, {
"_index" : "_river",
"_type" : "my_river_1",
"_id" : "_custom",
"_score" : 1.0, "_source" :
{"jdbc":{"version":1,"digest":"Cl6/6IfJ4FSO1JtXdmochH4booTba2Vq9HClavrMk6s="}}
}, {
"_index" : "_river",
"_type" : "my_river_2",
"_id" : "_meta",
"_score" : 1.0, "_source" : { "type" : "jdbc", "jdbc" : {
"driver" : "oracle.jdbc.OracleDriver", "url" :
"jdbc:oracle:thin:@//hostname:1521/service", "user" : "username",
"password" : "userpass", "sql" : "select 2 from dual" }}
}, {
"_index" : "_river",
"_type" : "my_river_2",
"_id" : "_status",
"_score" : 1.0, "_source" :
{"ok":true,"node":{"id":"1IPVVy9uRa2u7mRVlPZrKA","name":"Nathaniel
Essex","transport_address":"inet[/10.132.7.185:9300]"}}
}, {
"_index" : "_river",
"_type" : "my_river_2",
"_id" : "_custom",
"_score" : 1.0, "_source" :
{"jdbc":{"version":1,"digest":"rqxKjWSzm3pVCn7FeO1+8NMWrmofY7F0OWr12tkYekM="}}
} ]
}
}

Can anyone explain me how to access my_river_2?

Best regards,
Lukasz

--


(system) #2