阮老师的入门教程
http://www.ruanyifeng.com/blog/2017/08/elasticsearch.html
通俗易懂的漫画
http://developer.51cto.com/art/201904/594615.htm
倒排索引结构
https://blog.youkuaiyun.com/qq_33330687/article/details/100729059
https://www.cnblogs.com/baizhanshi/p/9792222.html
入门进阶
https://www.cnblogs.com/jajian/p/11223992.html
电子书
入门基本用法
https://www.cnblogs.com/xiaohouzai/p/9635238.html
JAVA API操作ES详解
https://my.oschina.net/woter/blog/1842801#h4_4
文档通过其 _index 、 _type 、 _id 唯一确定
增加数据(PUT /{index}/{type}/{id})
PUT /website/blog/123
{
"title": "My first blog entry",
"text": "Just trying this out...",
"date": "2014/01/01"
}
如上例,我们的索引叫做 “website” ,类型叫做 “blog” ,我们选择的ID是 “123”
Elasticsearch的响应:
{
"_index": "website",
"_type": "blog",
"_id": "123",
"_version": 1,
"created": true
}
响应指出请求的索引已经被成功创建,这个索引中包含 _index 、 _type 和 _id 元数据,以及一个新元素: _version 。Elasticsearch中每个文档都有版本号,每当文档变化(包括删除)都会使 _version 增加
注:如果我们的数据没有自然ID,我们可以让Elasticsearch自动为我们生成。URL现在只包含 _index 和 _type 两个字段,
POST /{index}/{type}(例子变为POST /website/blog/)
查询数据(GET /{index}/{type}/{id})
例:GET /website/blog/123?pretty
在任意的查询字符串中增加 pretty 参数,类似于上面的例子。会让Elasticsearch美化输
出(pretty-print)JSON响应以便更加容易阅读。
响应包含了现在熟悉的元数据节点,增加了 _source 字段,它包含了在创建索引时我们发送
给Elasticsearch的原始文档。
查询数据的某一部分(GET /{index}/{type}/{id}?_source=)
例:GET /website/blog/123?_source=title,text
_source 字段现在只包含我们请求的字段,而且过滤了 date 字段;
或者你只想得到 _source 字段而不要其他的元数据,你可以这样请求:GET /website/blog/123/_source
它仅仅返回:
{
"title": "My first blog entry",
"text": "Just trying this out...",
"date": "2014/01/01"
}
删除和更新语法与前面的无异,删除delete请求,更新put