使用 man ascii 来查看 ASCII 表。
7.0

7.0

Elastic Stack 7.0.0 正式版已经发布

资讯动态medcl 发表了文章 • 3 个评论 • 3364 次浏览 • 2019-04-11 09:18 • 来自相关话题

Elastic Stack 7.0.0 正式版已经发布了,包含很多新的功能,大家可以去下载使用了。  https://www.elastic.co/blog/el ... eased  
dark-mode.gif
    下载链接: Elasticsearch: https://www.elastic.co/downloa ... 7-0-0 Logstash: https://www.elastic.co/downloa ... 7-0-0 Kibana: https://www.elastic.co/downloa ... 7-0-0   其他模块及产品的下载: https://www.elastic.co/downloads  
Elastic Stack 7.0.0 正式版已经发布了,包含很多新的功能,大家可以去下载使用了。  https://www.elastic.co/blog/el ... eased  
dark-mode.gif
    下载链接: Elasticsearch: https://www.elastic.co/downloa ... 7-0-0 Logstash: https://www.elastic.co/downloa ... 7-0-0 Kibana: https://www.elastic.co/downloa ... 7-0-0   其他模块及产品的下载: https://www.elastic.co/downloads  

Elasticsearch 移除 type 之后的新姿势

经验分享medcl 发表了文章 • 0 个评论 • 22388 次浏览 • 2018-05-03 15:41 • 来自相关话题

随着 7.0 版本的即将发布,type 的移除也是越来越近了,在 6.0 的时候,已经默认只能支持一个索引一个 type 了,7.0 版本新增了一个参数 include_type_name ,即让所有的 API 是 type 相关的,这个参数在 7.0 默认是 true,不过在 8.0 的时候,会默认改成 false,也就是不包含 type 信息了,这个是 type 用于移除的一个开关。

让我们看看最新的使用姿势吧,当 include_type_name 参数设置成 false 后:

  • 索引操作:PUT {index}/{type}/{id}需要修改成PUT {index}/_doc/{id}
  • Mapping 操作:PUT {index}/{type}/_mapping 则变成 PUT {index}/_mapping
  • 所有增删改查搜索操作返回结果里面的关键字 _type 都将被移除
  • 父子关系使用 join 字段来构建
#创建索引
PUT twitter
{
  "mappings": {
    "_doc": {
      "properties": {
        "type": { "type": "keyword" }, 
        "name": { "type": "text" },
        "user_name": { "type": "keyword" },
        "email": { "type": "keyword" },
        "content": { "type": "text" },
        "tweeted_at": { "type": "date" }
      }
    }
  }
}

#修改索引
PUT twitter/_doc/user-kimchy
{
  "type": "user", 
  "name": "Shay Banon",
  "user_name": "kimchy",
  "email": "shay@kimchy.com"
}

#搜索
GET twitter/_search
{
  "query": {
    "bool": {
      "must": {
        "match": {
          "user_name": "kimchy"
        }
      },
      "filter": {
        "match": {
          "type": "tweet" 
        }
      }
    }
  }
}

#重建索引
POST _reindex
{
  "source": {
    "index": "twitter"
  },
  "dest": {
    "index": "new_twitter"
  }
}

相关链接:

Elastic Stack 7.0.0 正式版已经发布

资讯动态medcl 发表了文章 • 3 个评论 • 3364 次浏览 • 2019-04-11 09:18 • 来自相关话题

Elastic Stack 7.0.0 正式版已经发布了,包含很多新的功能,大家可以去下载使用了。  https://www.elastic.co/blog/el ... eased  
dark-mode.gif
    下载链接: Elasticsearch: https://www.elastic.co/downloa ... 7-0-0 Logstash: https://www.elastic.co/downloa ... 7-0-0 Kibana: https://www.elastic.co/downloa ... 7-0-0   其他模块及产品的下载: https://www.elastic.co/downloads  
Elastic Stack 7.0.0 正式版已经发布了,包含很多新的功能,大家可以去下载使用了。  https://www.elastic.co/blog/el ... eased  
dark-mode.gif
    下载链接: Elasticsearch: https://www.elastic.co/downloa ... 7-0-0 Logstash: https://www.elastic.co/downloa ... 7-0-0 Kibana: https://www.elastic.co/downloa ... 7-0-0   其他模块及产品的下载: https://www.elastic.co/downloads  

Elasticsearch 移除 type 之后的新姿势

经验分享medcl 发表了文章 • 0 个评论 • 22388 次浏览 • 2018-05-03 15:41 • 来自相关话题

随着 7.0 版本的即将发布,type 的移除也是越来越近了,在 6.0 的时候,已经默认只能支持一个索引一个 type 了,7.0 版本新增了一个参数 include_type_name ,即让所有的 API 是 type 相关的,这个参数在 7.0 默认是 true,不过在 8.0 的时候,会默认改成 false,也就是不包含 type 信息了,这个是 type 用于移除的一个开关。

让我们看看最新的使用姿势吧,当 include_type_name 参数设置成 false 后:

  • 索引操作:PUT {index}/{type}/{id}需要修改成PUT {index}/_doc/{id}
  • Mapping 操作:PUT {index}/{type}/_mapping 则变成 PUT {index}/_mapping
  • 所有增删改查搜索操作返回结果里面的关键字 _type 都将被移除
  • 父子关系使用 join 字段来构建
#创建索引
PUT twitter
{
  "mappings": {
    "_doc": {
      "properties": {
        "type": { "type": "keyword" }, 
        "name": { "type": "text" },
        "user_name": { "type": "keyword" },
        "email": { "type": "keyword" },
        "content": { "type": "text" },
        "tweeted_at": { "type": "date" }
      }
    }
  }
}

#修改索引
PUT twitter/_doc/user-kimchy
{
  "type": "user", 
  "name": "Shay Banon",
  "user_name": "kimchy",
  "email": "shay@kimchy.com"
}

#搜索
GET twitter/_search
{
  "query": {
    "bool": {
      "must": {
        "match": {
          "user_name": "kimchy"
        }
      },
      "filter": {
        "match": {
          "type": "tweet" 
        }
      }
    }
  }
}

#重建索引
POST _reindex
{
  "source": {
    "index": "twitter"
  },
  "dest": {
    "index": "new_twitter"
  }
}

相关链接: