Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Advanced Elasticsearch 7.0

You're reading from  Advanced Elasticsearch 7.0

Product type Book
Published in Aug 2019
Publisher Packt
ISBN-13 9781789957754
Pages 560 pages
Edition 1st Edition
Languages
Author (1):
Wai Tak Wong Wai Tak Wong
Profile icon Wai Tak Wong

Table of Contents (25) Chapters

Preface Section 1: Fundamentals and Core APIs
Overview of Elasticsearch 7 Index APIs Document APIs Mapping APIs Anatomy of an Analyzer Search APIs Section 2: Data Modeling, Aggregations Framework, Pipeline, and Data Analytics
Modeling Your Data in the Real World Aggregation Frameworks Preprocessing Documents in Ingest Pipelines Using Elasticsearch for Exploratory Data Analysis Section 3: Programming with the Elasticsearch Client
Elasticsearch from Java Programming Elasticsearch from Python Programming Section 4: Elastic Stack
Using Kibana, Logstash, and Beats Working with Elasticsearch SQL Working with Elasticsearch Analysis Plugins Section 5: Advanced Features
Machine Learning with Elasticsearch Spark and Elasticsearch for Real-Time Analytics Building Analytics RESTful Services Other Books You May Enjoy

Metrics aggregations

The metrics aggregations family provides common uses of functions to perform simple mathematical operations on values in one or more fields, and help to analyze grouped sets of documents. We will illustrate each type of aggregation in the metrics family using the fields from the cf_etf, cf_etf_hist_price, and cf_etf_dividend indexes in the following subsections.

avg

Compute the average of the numeric field value of the records. The following example aims to find the average change of the ACWF ETF in the cf_etf_hist_price index, and the value is 0.0624:

"query": { "match": { "symbol": "ACWF"}},"aggs": {"acwf_avg_close_price":{"avg": ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}