ElasticSearch 新增表字段
2018-03-16 10:41
141 查看
1.新增表字段(Elasticsearch中的mapping一旦创建,就不能再修改。但是添加字段是可以的)::PUT my_index/_mapping/my_type
{
"properties": {
"new_column": {
"type": "integer"
}
}
}2.修改表字段的方法 http://www.cnblogs.com/Creator/p/3722408.html
3.ElasticSearch 数据架构的主要概念(与关系数据库Mysql对比)
4.多字段查询:POST /my_index/post/_search
{
"query": {
"bool": {
"must": {
"multi_match" : {
"query" : "search_key",
"type" : "best_fields",
"fields" : ["column1", "column2"],
"analyzer" : "ik_smart"
}
},
"filter": {
"range":{
"column3":{
"lte":1//小于
}
}
}
}
},
"stored_fields": ["column1", "column2", "column3", "column4","column5"],
"highlight" : {//高亮显示
"fields" : {
"column1" : {},
"column2" : {}
}
}
}
{
"properties": {
"new_column": {
"type": "integer"
}
}
}2.修改表字段的方法 http://www.cnblogs.com/Creator/p/3722408.html
3.ElasticSearch 数据架构的主要概念(与关系数据库Mysql对比)
4.多字段查询:POST /my_index/post/_search
{
"query": {
"bool": {
"must": {
"multi_match" : {
"query" : "search_key",
"type" : "best_fields",
"fields" : ["column1", "column2"],
"analyzer" : "ik_smart"
}
},
"filter": {
"range":{
"column3":{
"lte":1//小于
}
}
}
}
},
"stored_fields": ["column1", "column2", "column3", "column4","column5"],
"highlight" : {//高亮显示
"fields" : {
"column1" : {},
"column2" : {}
}
}
}
相关文章推荐
- Elasticsearch入门CRUD(新增、查询、修改、删除)
- ElasticSearch新增IK扩展词后,让历史数据生效方法
- Elasticsearch新增一个字段并赋值
- 删除 windos服务 elasticsearch 新增windos服务 ES
- Elasticsearch 索引新增字段并且设置mappping
- elasticSearch 新增数据
- elasticsearch 5.5.0 java操作(新增索引、分页搜索)
- 上海新增 9 条地铁规划!哪些到你家?
- elasticsearch__6__es部分名词说明与配置文件详解
- SQL Server 2017新增:trim函数(移除左右空格、指定字符)
- Windows 8.1 新增控件之 CommandBar
- elasticsearch插件一——-head插件安装详解
- ElasticSearch第1课之基本介绍
- 清理Elasticsearch中过期的日志索引
- Redis集群与插槽分配(动态新增或删除结点)
- SQL存储过程-新增和修改,参数Xml数据类型
- Elasticsearch 基础教程
- elasticsearch
- Mongo同步数据到Elasticsearch
- Java 7新增的Object类