In latest version, Jorg moves index/type settings to jdbc object.

See example on front page here: 
https://github.com/jprante/elasticsearch-river-jdbc

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 20 déc. 2013 à 22:29, Nikolay Chankov <[email protected]> a écrit :

Thanks Jörg

I've managed to fix it by first problem, basically by creating the index before 
creating the river and then everything went well.

But, I tried to reproduce the same on another server, fresh install with the 
latest stable elasticsearch 0.90.8 as well as latest jdbc and mysql jdbc 
connector (my development server uses old version of ES).
So, I've managed to install the server as well as to connect it to mysql

But now the problem is that when I run The command to create the river it 
doesn't put the data into the proper index even though it was specified.

Here is the current set of commands which I am using to create the index and 
river:
curl -XDELETE localhost:9200/_river/venues_river
curl -XDELETE 'http://localhost:9200/venues'
curl -XPUT 'http://localhost:9200/venues/'
curl -XPUT 'http://localhost:9200/venues/venue/_mapping' -d '
{    
    "venue" : {
        "properties" : {
            "object" : { "type" : "string" },
            "id" : { "type" : "integer" },
            "name" : { "type" : "string" },
            "description" : { "type" : "string" },
            "town" : { "type" : "string" },
            "town_id" : { "type" : "integer" },
            "county" : { "type" : "string" },
            "county_id" : { "type" : "integer" },
            
            "phone" : { "type" : "string" },
            "web" : { "type" : "string" },
            "type" : { "type" : "string" },
            "type_id" : { "type" : "integer" },
            "postcode" : { "type" : "string" },
            
            "created" : { "type" : "date" },
            "modified" : { "type" : "date" },

            "address" : { "type" : "string" },
            "email" : { "type" : "string" },

            "slug" : { "type" : "string" },
            "location" : {"type" : "geo_point"}
        }
    }
}'
curl -XPUT 'localhost:9200/_river/venues_river/_meta' -d '{
    "strategy" : "simple",
    "type" : "jdbc",
    "jdbc" : {
        "driver" : "com.mysql.jdbc.Driver",
        "url" : "jdbc:mysql://localhost:3306/database",
        "user" : "user",
        "password" : "pass",
        "sql" : "select * from search_venues"
    },
    "index" : {
        "index" : "venues",
        "type" : "venue"
    }
}'

The data itself is inserted, but instead to be inserted on "venues" index, it 
is in "jdbc", so I can access it by localhost:9200/jdbc/_search...

Strangely enough, this script is working as expected on my development server 
which is:
ES: 0.90.5
JDBC: elasticsearch-river-jdbc-2.2.1.jar
Mysql JDBC mysql-connector-java-5.1.26-bin.jar

I am sorry, by asking probably stupid questions...

Thank you in advance


> On Friday, December 20, 2013 8:08:02 AM UTC, Jörg Prante wrote:
> You must use "lat" and "lon" as field names within geo_type, not "lat" and 
> "lng".
> 
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/36a3eec8-25a3-499a-b7b2-3a868741ac35%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/A9D35C11-2F98-4478-96DD-6C3B13972826%40pilato.fr.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to