i can't seem to understand how to fully set up my type mappings while using
jdbc rivers and sql server.
here's an example.
PUT /_river/mytest_river/_meta
{
"type": "jdbc",
"jdbc": {
"url":"jdbc:sqlserver://mydbserver:1433;databaseName=mydatabase",
"user":"myuser",
"password":"xxx",
"sql":"select * from dbo.musicalbum (nolock)",
"strategy" : "oneshot",
"index" : "myindex",
"type" : "album",
"bulk_size" : 100,
"max_retries": 5,
"max_retries_wait":"30s",
"max_bulk_requests" : 5,
"bulk_flush_interval" : "5s",
"type_mapping": {
"album": {"properties": {
"AlbumDescription": {"type": "string"},
"AlbumID": {"type": "string"},
"Artist": {"type": "string"},
"Genre": {"type": "string","index" : "not_analyzed"},
"Label": {"type": "string"},
"Title": {"type": "string"},
"_id" : {"path" : "AlbumID"}
}
}
}
}
}
so you can see i've specified both a select statement (which normally would
dynamically produce the mapping for me) and also a type mapping. in the
type mapping i've tried to specify that i want the _id to be the same as
AlbumID, and also that i want the Genre to be not_analyzed. it ends up
throwing multiple errors, only indexing one document, and not creating my
full mapping.
here's what the mapping ends up looking like: (skipping some of the columns
altogether!)
{
"myindex": {
"mappings": {
"album": {
"properties": {
"AlbumDescription": {
"type": "string"
},
"AlbumID": {
"type": "string"
},
"Artist": {
"type": "string"
},
"Genre": {
"type": "string"
},
"Title": {
"type": "string"
}
}
}
}
}
}
any assistance would be helpful. it's driving me nuts.
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4c9af783-cf6c-4e41-a287-83ff5589350e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.