Questions tagged [date-histogram]

A multi-bucket aggregation similar to the histogram except it can only be applied on date values.

Since dates are represented in elasticsearch internally as long values, it is possible to use the normal histogram on dates as well, though accuracy will be compromised. The reason for this is in the fact that time based intervals are not fixed (think of leap years and on the number of days in a month). For this reason, we need special support for time based data. From a functionality perspective, this histogram supports the same features as the normal histogram. The main difference is that the interval can be specified by date/time expressions.

45 questions
0
votes
1 answer

Get inserted document counts in specific date range using date histogram in elasticsearch

I have list documents in elasticsearch which contains various fileds. documents looks like below. { "role": "api_user", "apikey": "key1" "data":{}, "@timestamp": "2021-10-06T16:47:13.555Z" }, { …
abinas patra
  • 359
  • 3
  • 21
0
votes
1 answer

How to get all buckets of last 24hrs in date histogram in elasticsearch

I am using Date Histogram with Minimum interval as Hourly to get the results of Last 24 Hours and getting below graph. (v is 7.4) The request is , GET access*/_search?pretty=true { "aggs": { "2": { "date_histogram": { "field":…
prat
  • 103
  • 2
  • 10
0
votes
1 answer

postgresql query equivalent of date histogram with extended bounds in elastic search

I have a table with the following columns: column1 column2 timestamp event_id c1v1 c2v1 2021-03-11 00:00:00 1 c1v2 c2v2 2021-03-11 01:03:00 1 c1v3 c2v3 2021-03-12 10:00:00 2 c1v4 c2v4 2021-03-13 20:00:00 1 c1v5 c2v5 2021-03-13…
Harshit Nagar
  • 368
  • 3
  • 16
0
votes
1 answer

Need help in date_histogram + nested ES query

I need to create 15m bucket on Timestamp and then in each timestamp I need sum on each type of books and of course the total of books. for example, my data is like below [ { "books":[ { "id":0, "count":10 …
missingsphinx
  • 73
  • 1
  • 6
0
votes
1 answer

Date histogram per minutes in pandas

I am trying to plot a simple date histogram(just count occurences per N minutes) using pandas. However the best I have reach is the following: import pandas as pd df = pd.read_csv('mydata.csv',sep=' ',usecols=[0,1]) df.columns = ['smdate',…
trikelef
  • 2,192
  • 1
  • 22
  • 39
0
votes
1 answer

how to display only single date in kibana date histogram

In Kibana Date Histogram date is displaying multiple times like below 2019-12-11 2019-12-11 2019-12-12 2019-12-12 2019-12-13 2019-12-13 -> but i need only one time to appear like this 2019-12-11 2019-12-12 2019-12-13
0
votes
1 answer

Pipeline aggregation with Date histogram doesn’t return expected result

I'm facing an issue regarding to use Pipeline aggregation with Date histogram. I need to filter data from: "2019-03-08T06:00:00Z" to "2019-03-09T10:00:00Z" and do histogram aggregation on that. Then calculate avg value after aggregating by…
0
votes
1 answer

Box plot from binned data in Python

I would like to create a box plot from some pre-counted data (a histogram, essentially). Is it possible to do this in Python? I am using matplotlib and I noticed that the boxplot function does not have something similar to the weights parameter of…
Călin
  • 347
  • 2
  • 13
0
votes
1 answer

Convert for loop into vector expression

I'm new to MATLAB and learning to use vector expressions instead of verbose for loops. I have a snippet and I was wondering whether it could even be written in a concise vector and if so how would I modify it. for v = I X(i, v) = X(i, v) +…
Rabeez Riaz
  • 442
  • 5
  • 15
0
votes
1 answer

Histogram with Time scale error in D3

I'm trying to make a histogram graph showing the total amount of running overs per hour. The fields are: Data;Horário;Endereço;Nº;Bairro;Cruzamento;Referência;Região;Classificação;Sexo;Idade;Gravidade das Lesões;Morte I have to get the data from the…
melnic
  • 11
  • 2
0
votes
1 answer

Need help in using HdrHistogram java library

I am using HdrHistogram java library but I am not getting the desired output. Can you please help me understand there is an error in the library or expected value. In this case I am expecting the output to be 1000000, but actual output is…
user1918858
  • 1,202
  • 1
  • 20
  • 29
0
votes
1 answer

Elasticsearch: accuracy on a filter aggregation

I'm fairly new to Elasticsearch (using version 2.2). To simplify my question, I have documents that have a field named termination, which can sometimes take the value transfer. I currently do this request to aggregate by month the number of…
Raphael
  • 49
  • 9
0
votes
1 answer

Using Date Histogram in Elasticsearch to count sequential activity

I am indexing Tomcat access-log data into Elasticsearch (1.7.3). The documents that I deal with have the concept of duration, represented as end time and duration in millisec (start time can be calculated, though I can store it as well, if it helps…
0
votes
1 answer

Elasticsearch Date_Histogram does not cover entire filter

I'm using ES Date Histogram and a weird behavior started happening and I'm wondering why. This is the request i'm sending to elasticsearch: { "from": 0, "size": 0, "query": { "filtered": { "filter": { "and": [ …
AlexD
  • 4,062
  • 5
  • 38
  • 65
0
votes
2 answers

Elasticsearch aggregation with date_histogram gives wrong result for buckets

I have data with timestamp. I want to do date_histogram on that. When I run the query it return total as 13 which is correct, but it shows one record in 2014-10-10, but I cant find that record in data I have. curl…
Nilesh
  • 20,521
  • 16
  • 92
  • 148
1 2
3