我根本不知道如何使用这个插件。
我正在运行这个curl
:
curl -XPUT 'localhost:9200/_river/faycare_kids/_meta' -d '{
"jdbc":{
"driver" : "org.postgresql.Driver",
"url" : "jdbc:postgresql://localhost:5432/faycare",
"user" : "faycare",
"password" : "password",
"strategy" : "simple",
"poll" : "5s",
"scale" : 0,
"autocommit" : true,
"fetchsize" : 10,
"index" : "faycare",
"type" : "kid",
"max_rows" : 0,
"max_retries" : 3,
"max_retries_wait" : "10s",
"sql" : "SELECT kid.id as _id,kid.first_name,kid.last_name FROM kid;"
}
}'
它返回:
{"ok":true,"_index":"_river","_type":"faycare_kids","_id":"_meta","_version":1}
如何搜索/获取/查看我的数据?
我如何知道是否有任何内容被编入索引?
我尝试了很多东西:
curl -XGET 'localhost:9200/_river/faycare_kids/_search?pretty&q=*'
这给了我关于_river
curl -XGET 'localhost:9200/faycare/kid/_search?pretty&q=*'
这告诉我:"error" : "IndexMissingException[[faycare] missing]"
我正在sudo service elasticsearch start
后台运行它。