【问题标题】:Elasticsearch > Is it possible to build indices on base of FIELDSElasticsearch > 是否可以在 FIELDS 的基础上构建索引
【发布时间】:2016-04-29 13:23:20
【问题描述】:

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

【问题讨论】:

    标签: elasticsearch logstash elastic-stack filebeat


    【解决方案1】:

    来自Elasticsearch: The Definitive Guide

    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 已经为所有字段建立了索引。

    【讨论】:

      猜你喜欢
      • 2011-02-11
      • 1970-01-01
      • 2021-11-06
      • 2015-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-29
      相关资源
      最近更新 更多