我必须索引拥有数百万条记录的PostgreSQL存储过程。有人可以告诉我如何将存储过程索引到弹性搜索中的过程。
不使用参数我想在弹性搜索中下载整个数据。请帮帮我:
bin=/home/elasticsearch-jdbc-2.3.1.0/bin
lib=/home/elasticsearch-jdbc-2.3.1.0/lib
echo '{
"jdbc": {
"driver": "org.postgresql.Driver",
"url": "jdbc:postgresql://localhost:5432/testdb",
"user": "b2g_mns",
"password": "b2gmns",
"sql": [
{
"callable": true,
"statement": "{call cloud10k.sp_fs_comp_search(?::varchar, ?::varchar, ?::varchar, ?::bigint)}",
"parameter": [
"CITI",
"ALL",
"ALL",
0
]
}
],
"index": "my_jdbc_river03",
"type": "my_jdbc_river03"
}
}' | java \
-cp "/home/elasticsearch-jdbc-2.3.1.0/lib/*" \
-Dlog4j.configurationFile=/home/elasticsearch-jdbc-2.3.1.0
/bin/log4j2.xml \
org.xbib.tools.Runner \
org.xbib.tools.JDBCImporter