Elasticsearch: The Definitive Guide Learning Chapter 10 Index Management

本文详细介绍了Elasticsearch中索引的创建与删除、分析器的配置、类型与映射的概念,以及Lucene如何处理文档。探讨了动态映射、默认映射及重新索引数据的策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Creating an Index

在这里插入图片描述

Deleting an Index

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Configuring Analyzers

在这里插入图片描述

Types and Mappings

A type consists of a name-- such as user or blogpost – and a mapping. The mapping, like a database schema, describes the fields or properties that documents of that type may have, the datatype of each field-- such as string, integer, or date — and how those fields should be indexed and stored by Lucence.

How Lucence Sees Documents

A document in Lucene consists of a simple list of field-value pairs. A field must have at least one value, but any field can contain multiple values. When we index a document in Lucene, the values for each field are added to the inverted index for the associated field. Optionally, the original values may also be stored unchanged so that they can be retrieved later.

How types are implemented

The type name of each document is stored with the document in a metadata field called _type. WHen we search for documents of a particular type, Elasticsearch simply uses a filter on the _type field to restrict results to documents of that type.

Dynamic Mapping

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

dynamic_templates

在这里插入图片描述

Default Mapping

在这里插入图片描述

Reindexing Your Data

The simplest way to apply these changes to your existing dta is to reindex: create a new index with the new settings and copy all of your documents from the old index to the new index.

alias

在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值