0

在ELK(Elasticsearch、Logstash、Kibana)的上下文中,了解到Logstash有FILTER可以利用grok将日志消息划分到不同的字段。根据我的理解,它只会帮助将非结构化的日志数据变成更结构化的数据。但我不知道 Elasticsearch 如何利用字段(由 grok 完成)来提高查询性能?是否可以像传统关系数据库那样在字段的基础上建立索引?

4

1 回答 1

0

来自Elasticsearch:权威指南

Inverted index

Relational databases add an index, such as a B-tree index, to specific columns in 
order to improve the speed of data retrieval. Elasticsearch and Lucene use a 
structure called an inverted index for exactly the same purpose.

By default, every field in a document is indexed (has an inverted 
index) and thus is searchable. A field without an inverted index is 
not searchable. We discuss inverted indexes in more detail in Inverted Index.

所以你不需要做任何特别的事情。默认情况下,Elasticsearch 已经为所有字段建立了索引。

于 2016-05-09T17:55:24.953 回答