Mac Elasticsearch 新建索引

Elasticsearch是一个基于Apache Lucene的开源搜索引擎,用Java开发,使用Lucene作为其核心来实现所有索引和搜索的功能。它的目的是通过简单的RESTful API来隐藏Lucene的复杂性,从而让全文搜索变得简单。

不过Elasticsearch不仅仅是Lucene和全文搜索,它还是

1、分布式的实时文件存储,每个字段都被索引并可被搜索;

2、分布式的实时分析搜索引擎;

3、可以扩展到上百台服务器,处理PB级结构化和非结构化数据。

一、新建索引

官网API:https://www.elastic.co/guide/cn/elasticsearch/guide/current/_creating_an_index.html

测试用例

curl -XPUT 'localhost:9200/my_index/my_type/1?pretty' -H 'Content-Type: application/json' -d'
{
	"name" : "jiangxingqi",
	"sex" :  "0",
	"introduction" :   "My name is jiangxingqi, I am a student of CUEB."
}
'

Mac Elasticsearch 新建索引_第1张图片
二、查询

你可能感兴趣的:(#,深入浅出大数据)