我想通过_id对结果进行排序,所以我需要添加
"_id" : {
"index" : "not_analyzed",
"store" : true
}
到我的索引,对吗? 这是我的jdbc feeder的脚本:
#!/bin/bash
#Verzeichnis von JDBC -> wichtig, anpassen!
export JDBC_IMPORTER_HOME=~/Downloads/elasticsearch-jdbc-1.6.0.0
bin=$JDBC_IMPORTER_HOME/bin
lib=$JDBC_IMPORTER_HOME/lib
echo '{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://xxxxxxxxx",
"user" : "xxxx",
"password" : "xxxxxxx",
"index" : "xxxxxxxx",
"type" : "xxxxxx",
"sql" : "SELECT xxxxxxxxx"
}
}' | java \
-cp "${lib}/*" \
-Dlog4j.configurationFile=${bin}/log4j2.xml \
org.xbib.tools.Runner \
org.xbib.tools.JDBCImporter
我添加了
"index_settings" : {
"_id" : {
"index" : "not_analyzed",
"store" : true
}
}
后
"password" : "xxxxxxx",
"index" : "xxxxxxxx",
但它不起作用 我在哪里添加此设置?