Elasticsearch数据表示

时间:2015-01-15 09:12:26

标签: elasticsearch lucene kibana

我是弹性搜索的新手,我想我会通过10 minutes walk through开始。 但我偶然发现了一些非常基本的疑虑。我无法在这里找出数据表示。例如。该教程提到了创建索引

curl -XPUT http://localhost:9200/shakespeare -d '
{
 "mappings" : {
  "_default_" : {
   "properties" : {
    "speaker" : {"type": "string", "index" : "not_analyzed" },
    "play_name" : {"type": "string", "index" : "not_analyzed" },
    "line_id" : { "type" : "integer" },
    "speech_number" : { "type" : "integer" }
   }
  }
 }
}
';

我知道这是一个JSON字符串,但除此之外我无法理解这种表示形式?我没有得到什么是默认,not_analyzed等是什么意思。

在继续使用elasticsearch之前,是否有任何标准需要了解数据的表示方式? 我对弹性搜索完全不熟悉,如果我获得一些信息/教程可以帮助我了解如何开始学习这项技术,我将非常感激。

谢谢&问候 苏尼

2 个答案:

答案 0 :(得分:1)

我认为10 minutes walk through的主要目的是提供关于Kibana的快速演示,而不是对弹性搜索(映射,索引等)的全面理解。

但是如果您想了解该示例中发生的情况,您可能想知道如何查看文档。

示例:

默认映射:

Often, all types in an index share similar fields and settings. 
It can be more convenient to specify these common settings in 
the _default_ mapping, instead of having to repeat yourself every 
time you create a new type. The _default_ mapping acts as a 
template for new types. All types created after the _default_ 
mapping will include all of these default settings, unless 
explicitly overridden in the type mapping itself.

有关默认映射的更多详情,请参阅here

答案 1 :(得分:1)

10分钟的步行通过是在Klastic上运行,在Elasticsearch之上运行,并且在了解ES时,恕我直言不是一个好的起点。

在过去几年中,我个人对这些介绍有所帮助:

http://joelabrahamsson.com/elasticsearch-101/

http://exploringelasticsearch.com/overview.html

整体而言,ES文档相当完整,看起来很棒但是很难通过新手来找到你需要的东西。