Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What kind of Date Math is commonly used in ElasticSearch

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about what kind of Date Math is commonly used in ElasticSearch. Many people may not know much about it. In order to make you understand better, the editor summed up the following content for you. I hope you can get something according to this article.

Date mathematical expressions are commonly used in Elasticsearch and are often used as retrieval conditions in queries, such as range or daterange. Expressions usually have the following actions:

+ 1h, which means add an hour.

-1D, which means minus one day

/ d, which means rounding to one day

There are also many units supported, such as

Y, for one year

M, for one month

W, which represents a week

D, for one day

H, which represents one hour

M, for one minute

S, for one second

Ms stands for millisecond

For example:

Now+1h, which indicates the current time plus an hour, that is, an hour later

Now+1h+1m, indicating the current time plus an hour and a minute, that is, an hour and a minute later

Now+1h/d, which represents the current time plus one hour and is rounded to one day.

2019-01-01 | | + 1m _

After reading the above, do you have any further understanding of the Date Math commonly used in ElasticSearch? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report