【ElasticSearch】 ElasticSearch基本概念和RESTful API(四)
2021-01-09 19:28
                         标签:rest   res   mapping   elastic   blog   部分   ODB   target   访问      索引(index)是Elasticsearch对逻辑数据的逻辑存储,所以它可以分为更小的部分。 可以把索引看成关系型数据库的表,索引的结构是为快速有效的全文索引准备的,特别是它不存储原始值。 Elasticsearch可以把索引存放在一台机器或者分散在多台服务器上,每个索引有一或多个分片(shard),每个 分片可以有多个副本(replica)。   所有文档写进索引之前都会先进行分析,如何将输入的文本分割为词条、哪些词条又会被过滤,这种行为叫做 映射(mapping)。一般由用户自己定义规则。   在Elasticsearch中,提供了功能丰富的RESTful API的操作,包括基本的CRUD、创建索引、删除索引等操作。   本例演示示例Elasticsearch安装,参考:【ElasticSearch】 ElasticSearch安装(一)   Elasticsearch-Head插件安装,参考:【ElasticSearch】 elasticsearch-head插件安装(二)   本例通过Elasticsearch-Head插件访问Elasticsearch RESTful API   1、创建索引        【ElasticSearch】 ElasticSearch基本概念和RESTful API(四) 标签:rest   res   mapping   elastic   blog   部分   ODB   target   访问    原文地址:https://www.cnblogs.com/h--d/p/13089585.htmlElasticSearch基本概念
索引
文档
映射
文档类型
RESTful API
创建非结构化索引
 1 # 创建索引
 2 PUT /test 
 3 {
 4     "settings": {
 5           "index": {
 6             "number_of_shards": "2", #分片数
 7             "number_of_replicas": "0" #副本数 
 8         }
 9     } 
10 }
11 
12 #删除索引 
13 DELETE /test 
14 {
15     "acknowledged": true
16 }
下一篇:C#中动态调用DLL动态链接库
文章标题:【ElasticSearch】 ElasticSearch基本概念和RESTful API(四)
文章链接:http://soscw.com/index.php/essay/41230.html