0
我剛剛開始使用elastic search 5.5.2
。我正在使用logstash-jdbc-input
插件將數據從mysql
數據庫推送到elastic search
。下面是我使用找不到處理程序的uri [/ news]和方法[POST]
input {
jdbc {
jdbc_connection_string => "jdbc:mysql://localhost:3306/news"
jdbc_user => "root"
jdbc_password => "sunilgarg"
jdbc_validate_connection => true
jdbc_driver_library => "../jars/mysql-connector-java-5.1.21.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
statement => "SELECT * from news"
}
}
output {
stdout {codec => json_lines}
elasticsearch {
"index" => "news"
"document_type" => "news"
"hosts" => "localhost:9200"
"document_id" => "%{id}"
}
}
現在我能夠使用http://localhost:9200/news/_search具有以下機身
{
"query":{
"query_string":{
"query":"the"
}
}
}
現在,這是搜索甚至停止,我不想詞搜索logstash配置,所以,我想分析器通過使用該POST請求http://localhost:9200/news與請求體
{
"settings": {
"analysis": {
"analyzer": {
"my_english_analyzer": {
"type": "standard",
"max_token_length": 5,
"stopwords": "_english_"
}
}
}
}
}
但這表示
No handler found for uri [/news] and method [POST]
我錯過了什麼嗎?或者我以錯誤的方式得到這個?
請忽略,如果它太基本不問。
指數已經被創建的設置索引..可以請你解釋一下? –
如果您想更新設置,請閱讀https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html。您可能不得不關閉索引。更好地從頭開始國際海事組織。 – dadoonet
上面的問題解決了。但仍然可以搜索停止詞,如「the」:( –