Elasticsearch的工作原理是你的索引配置,假設你已經配置好了一切,你準備好接受你需要編輯文件中/etc/elasticsearch/templates/
下面的示例所示找到一些文件是log4net
,我添加了地理空間的配置,我發現here:
{
"log4net": {
"template": "log4net*",
"mappings": {
"fluentd": {
"_ttl": {
"enabled": true,
"default": "62d"
},
"properties": {
"hostname": {
"type": "string",
"index": "not_analyzed"
},
"level": {
"type": "string",
"index": "not_analyzed"
},
"enviroment": {
"type": "string",
"index": "not_analyzed"
},
"site": {
"type": "string",
"index": "not_analyzed"
},
"username": {
"type": "string",
"index": "not_analyzed"
},
"logger": {
"type": "string",
"index": "not_analyzed"
},
"thread": {
"type": "string",
"index": "not_analyzed"
},
"systemname": {
"type": "string",
"index": "not_analyzed"
},
"message": {
"type": "string",
"index": "not_analyzed"
},
"location": {
"type": "geo_point",
"fielddata": {
"format": "compressed",
"precision": "1cm"
}
}
}
}
}
}
}
我做了一些編輯,但它仍然很不清楚,你需要什麼。我建議閱讀一些關於ElasticSearch如何工作的文章,觀看一些教程等。這裏的一些文章可能會有所幫助 - http://blog.smeef.co.uk/category/elastic-search/ – Nate
還有一些非常好的文章位於這裏 - https ://www.found.no/foundation/ – Nate