0

我想让我的结果可以按 _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",

但它不起作用
我在哪里添加这个设置?

4

0 回答 0