1:https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
1:https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
2: ES 映射配置文件
https://www.elastic.co/guide/cn/elasticsearch/guide/current/mapping-intro.html
3:JAVA API文档
https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html
1: 创建文档
员工目录,我们将做如下操作:
- 每个员工索引一个文档,文档包含该员工的所有信息。
- 每个文档都将是 employee 类型 。
- 该类型位于 索引 company内。
- 该索引保存在我们的 Elasticsearch 集群中。
ElasticSearch 涉及到的理论自己补齐:
PUT http://127.0.0.1:9200/company/employee/1 { "first_name" : "John", "last_name" : "Smith", "age" : 25, "about" : "I love to go rock climbing", "interests": [ "sports", "music" ] }
2: 检索文档