es教程
概念
关系数据库 ⇒ 数据库 ⇒ 表 ⇒ 行 ⇒ 列(Columns)
Elasticsearch ⇒ 索引(Index) ⇒ 类型(type) ⇒ 文档(Docments) ⇒ 字段(Fields)
mappings
Mapping is the process of defining how a document, and the fields it contains, are stored and indexed. For instance, use mappings to define:
> which string fields should be treated as full text fields.
> which fields contain numbers, dates, or geolocations.
> whether the values of all fields in the document should be indexed into the catch-all _all field.
> the format of date values.
> custom rules to control the mapping for dynamically added fields.
type为string类型的mapping的最重要的两个属性是index和analyzer.
index与三种可选项:
analyzed
First analyze the string and then index it. In other words, index this
field as full text.
not_analyzed
Index this field, so it is searchable, but index the value exactly as
specified. Do not analyze it.
no
Don’t index this field at all. This field will not be searchable
索引结构
ref
https://es.xiaoleilu.com/
https://www.cnblogs.com/dreamroute/p/8484457.html
https://www.jianshu.com/p/bd23b86848dd