jdbc-river を使用して Elasticsearch にデータをロードしようとしていますが、このエラーが発生しています。誰かが私に何が起こっているのか教えてもらえますか?
org.elasticsearch.index.mapper.MapperParsingException: object mapping for [foo] tried to parse as object, but got EOF, has a concrete value been provided to it?
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:515)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:462)
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:371)
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:400)
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:153)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:556)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:426)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[2014-03-19 22:06:06,672][INFO ][org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverMouth] bulk [11790] success [100 items] [15ms]
川の定義は次のとおりです。
curl -XPUT 'localhost:9200/_river/my_river/_meta' -d '{
"type" : "jdbc"
, "jdbc" : {
"url": "jdbc:postgresql://domainname.com:5432/myapp"
, "user": "user"
, "password": "passwd"
, "sql": "select * from foo"
, "index": "myapp"
, "type": "foo"
}
}'
Elasticsearch マッピングはまだありません。おそらくそれは問題です。私の理解では、自動的にマッピングされますが、必要に応じてマッピングを追加します。
postgres テーブル スキーマ (「データ型」、「is_nullable」):
"integer";"YES"
"boolean";"NO"
"boolean";"YES"
"character varying";"NO"
"timestamp with time zone";"YES"
"text";"YES"
"boolean";"NO"
"integer";"YES"
"integer";"YES"
"numeric";"YES"
"text";"YES"
"integer";"YES"
"numeric";"YES"
"numeric";"YES"
"numeric";"YES"
"character varying";"YES"
"character varying";"YES"
"date";"YES"
"numeric";"YES"
"numeric";"YES"
"numeric";"YES"
"character varying";"YES"
"character varying";"YES"
"character varying";"YES"
"character varying";"YES"
"boolean";"YES"
"integer";"YES"
"character varying";"YES"
"timestamp with time zone";"NO"
"timestamp with time zone";"NO"
"boolean";"YES"
"integer";"YES"
"character varying";"YES"
"numeric";"YES"
"integer";"YES"
"character varying";"YES"
"character varying";"YES"
"integer";"YES"
"integer";"NO"
"integer";"NO"