赞
踩
Elaticsearch,简称为 ES, ES 是一个开源的高扩展的分布式[全文搜索]引擎,Elasticsearch 是面向数据库,一条数据在这里就是一个文档。
ES是一个文档型数据库,下面将ES里面涉及到的元素与关系型数据库进行一一对应。
ElasticSearch | 索引(index) | 类型(type) | 文档(document) | 字段(field) |
---|---|---|---|---|
MySQL | 数据库(database) | 数据表(table) | 数据行(row) | 数据列(column) |
PUT /student
GET /student { "mappings": { "properties": { "info": { "type": "text", "analyzer": "ik_smart" }, "email": { "type": "keyword", "index": false }, "name": { "type": "object", "properties": { "firstName": { "type": "keyword", "index": false }, "lastName": { "type": "keyword", "index": false } } } } } }
GET /student
GET /_cat/indices
DELETE /student
PUT /student/_mapping
{
"properties": {
"age": {
"type": "integer"
}
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。