我想在Elasticsearch中导入一个文本文件。
文本文件每行包含一个(哈希)值。
在花了几个小时的努力之后,我没有完成它。
非常感谢您的帮助。
安装了Logstash的Elasticsearch 5.1.2。
样本数据:
2d75cc1bf8e57872781f9cd04a529256
00f538c3d410822e241486ca061a57ee
3f066dd1f1da052248aed5abc4a0c6a1
781770fda3bd3236d0ab8274577dddde
86b6c59aa48a69e16d3313d982791398
只需要一个索引“哈希”,输入“md5”
最佳答案
好吧,如果您有logstash,请使用logstash导入它。
配置示例:
input {
file {
path => "/path/myfile"
start_position => "beginning"
type => "md5"
}
}
output {
elasticsearch {
index => "hashes"
}
}
假设您在与elasticsearch相同的实例上运行logstash。
关于elasticsearch - 在Elasticsearch中导入文本文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41913766/