Is it possible for elasticsearch to calculate a cumulative total for a numerical field as it runs?

When utilizing a facet such as

  "histogram": {
    "key_field": "timestamp",
    "value_field": "amount",
    "time_interval": "1d"
  }

The resulting set includes the following:

{
  key: 1222732800000
  count: 642
  min: -985
  max: 483.25
  total: 1544.4000024795532
  total_count: 642
  mean: 2.4056074804977463
}

Is there a method to extract the peak high and peak low points of the tally? For instance, if the amount formed a numerical series like:

-4, -8, 10, -3, 30, -20

I am seeking a way to identify that the tally reached a peak low of -12 and a peak high of 25.

Answer №1

Sorry, but elasticsearch does not have the capability for this operation.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue with caching: Browser cache not being utilized even after implementing Cache-Control Header

First Requesthttps://i.sstatic.net/xtJCW.png Second Inquiryhttps://i.sstatic.net/4R9ln.png I have implemented a node module(express-cache-ctrl) to activate caching on a proxy. app.use(cache.public(3600)); Despite having Cache-control headers with max-age ...

Omit the <span> tag when exporting to XLS format

Currently, I have a functioning jQuery DataTable that utilizes the TableTools plug-in and includes <span> elements in one of the columns for each row. When clicking on the export button, my goal is to exclude or hide the <span> elements from t ...

The left-hand operator in Typescript is not valid

I am a beginner in typescript and I have been following a tutorial called Tour of Heroes on Angular's website. In the final chapter of the tutorial, when I tried to use HTTP with the provided code, everything seemed to run fine but I encountered an er ...

What method does jqGrid use to dynamically update the selection options list based on the status data?

Currently, I am utilizing jQgrid for displaying a list with data retrieved through Ajax. The list is displaying properly without any issues. However, my challenge lies in dynamically populating the list of options based on the status value received. Area ...

Tips for showcasing a string value across various lines within a paragraph using the <br> tag for line breaks

I'm struggling to show a string in a paragraph that includes tags to create new lines. Unfortunately, all I see is the br tags instead of the desired line breaks. Here is my TypeScript method. viewEmailMessage(messageId: number): void { c ...

Error: JavaScript function call did not provide a return value

Currently, I am in the process of creating a straightforward angular2/expressJS application. Within my expressJS code, I have an HTTP GET router call that retrieves all users from MongoDB and successfully returns them: app.get('/getusers', funct ...

Is it possible for $templateCache to preload images?

Is there a way to preload images in Angular without using a spinner after the controller is initialized? I've heard about caching templates with $templateCache. Can this be used to also preload images when the template contains <img> tags or sty ...

Exploring ways to retrieve boolean values with Angular and PHP

I am currently learning Angular and PHP and I am trying to make some modifications to the tutorial found at . Specifically, I want to change the second value to a checkbox and retrieve its value using both Angular and PHP. However, I am encountering an iss ...

Alter the cron schedule on-the-fly with a dynamic form

I am currently utilizing the Bull npm module to schedule jobs in Node.js. When it comes to repeating jobs, I want to be able to pass the value to cron through a form and update it dynamically. For instance, if I want a job to repeat every Monday to Frida ...

List in React without any unique identifiers

I have a list of numbers that I need to display in a table format. These numbers are fetched from an API call and not generated within my application. The data might change occasionally, but there are only around twenty values, so redrawing the entire tab ...

Stop music with one click, code in Javascript

I am encountering an issue with a set of 5 div boxes on my website. Each box is supposed to play a specific audio track when clicked, based on data attributes. However, I'm having trouble pausing the previous track when clicking on a new box, resultin ...

What is the method for selecting a specific row in a Primefaces Datatable using HtmlUnitDriver and Selenium?

Check out this code snippet: import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriv ...

Oh no! There seems to be an unexpected token "<" in my React Native project on Visual Studio Code

When utilizing react-native in VS Code, I encounter an issue where my code fails to compile and throws a syntax error for the "<" symbol. Strangely, many tags work fine with "react-native run-android" from the Terminal. This is the code snippet that I ...

Data binding in AngularJS allows for easy synchronization between the model and the view

I've been working on a simple AngularJS application that includes a form with two fields. However, I've run into an issue where I'm unable to read the values entered in these fields from my controller, as I keep getting 'undefined' ...

Rotating a 3D cube on its axis using Three.js

I am currently experimenting with rotating a cube on a corner, aiming to make it spin like the image shown in the link below. As a newcomer to Three.js, I apologize if this question seems basic. Below is the code for my current setup: var geometry= new ...

What is the best way to divide a GraphQL schema to avoid circular dependencies?

I have a question that is similar to the issue of circular dependency in GraphQL code discussed on Stack Overflow, but my problem lies within JavaScript (ES6). The size of my schema definition has become too large, and I am struggling to find a way to bre ...

What is the best method for incorporating meta data, titles, and other information at dynamic pages using Node.js and Express?

I am currently exploring methods to efficiently pass data to the html head of my project. I require a custom title, meta description, and other elements for each page within my website. Upon initial thought, one method that comes to mind is passing the da ...

What is the best way to invoke JavaScript from C# code in Ext.NET?

Within my project, I encountered a situation where the displayed time in Chrome is incorrect while it appears correctly in Explorer. To address this issue, I wrote a JavaScript code, but unfortunately, it did not resolve the problem. Below is the JavaScrip ...

Tips for handling uncaught exceptions in Internet Explorer

In both Chrome and Firefox, it is possible to suppress exceptions, but unfortunately, this is not the case with Internet Explorer (IE). window.addEventListener("error", function errorHandler(event) { console.log("exception should be suppressed and not ...

Generating an instance of an enum using a string in Typescript

Having trouble accessing the enum members of a numeric enum in TypeScript using window[name]. The result is an undefined object. export enum MyEnum { MemberOne = 0, MemberTwo = 1 } export class ObjectUtils { public static GetEnumMembers(name ...