Created
July 31, 2011 14:58
-
-
Save kimchy/1116858 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pin" : { | |
"properties" : { | |
"location1" : { | |
"type" : "geo_point" | |
}, | |
"location2" : { | |
"type" : "geo_point" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I trying use this example indexing jdbc, but it's return a exception with this error:
" [jdbc][facebook_users] failed to create index [facebook_users], disabling JDBC river...
org.elasticsearch.index.mapper.MapperParsingException: Mapping must have the
type
as the root object"
my column facebook_user is a text field with json objects stored.
my code:
[code]
curl -XPUT 'localhost:9200/_river/facebook_users/meta' -d ' {
"type": "jdbc",
"jdbc": {
"driver": "com.mysql.jdbc.Driver",
"url": "jdbc:mysql://localhost:3306/data",
"user": "root",
"password": "123",
"sql": "select friends from facebook_user where friends <> "" LIMIT 1000"
},
"index": {
"index": "facebook_users",
"type": "jdbc",
"type_mapping": [{
"facebook_users": {
"properties": {
"friends":{
"type": "nested"
}
}
}
}]
}
}'
[/code]
can you help me pls?