ElasticSearch ——(六)API约定

The Elasticsearch REST APIs are exposed using JSON over HTTP.

ES的REST API 是使用基于Http的JSON格式请求的。

The conventions listed in this chapter can be applied throughout the REST API, unless otherwise specified.

这个约定在本章中介绍以下几个点:

  • Multiple Indices
  • Date math support in index names
  • Common options
  • URL-based access control

多索引

Most APIs that refer to an index parameter support execution across multiple indices, using simple test1,test2,test3 notation (or _all for all indices). It also supports wildcards, for example: test* or test or tet or test, and the ability to “exclude” (-), for example: test*,-test3.

All multi indices APIs support the following url query string parameters:

ignore_unavailable
allow_no_indices
expand_wildcards

索引名中支持数字和日期

Date math index name resolution enables you to search a range of time-series indices, rather than searching all of your time-series indices and filtering the results or maintaining aliases. Limiting the number of indices that are searched reduces the load on the cluster and improves execution performance. For example, if you are searching for errors in your daily logs, you can use a date math name template to restrict the search to the past two days.

Almost all APIs that have an index parameter support date math in the index parameter value.

A date math index name takes the following form:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值