SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
1
Runtime Fields
Gilad Gal
Product Manager, Elasticsearch
2
This presentation and the accompanying oral presentation contain forward-looking statements, including statements
concerning plans for future offerings; the expected strength, performance or benefits of our offerings; and our future
operations and expected performance. These forward-looking statements are subject to the safe harbor provisions
under the Private Securities Litigation Reform Act of 1995. Our expectations and beliefs in light of currently
available information regarding these matters may not materialize. Actual outcomes and results may differ materially
from those contemplated by these forward-looking statements due to uncertainties, risks, and changes in
circumstances, including, but not limited to those related to: the impact of the COVID-19 pandemic on our business
and our customers and partners; our ability to continue to deliver and improve our offerings and successfully
develop new offerings, including security-related product offerings and SaaS offerings; customer acceptance and
purchase of our existing offerings and new offerings, including the expansion and adoption of our SaaS offerings;
our ability to realize value from investments in the business, including R&D investments; our ability to maintain and
expand our user and customer base; our international expansion strategy; our ability to successfully execute our
go-to-market strategy and expand in our existing markets and into new markets, and our ability to forecast customer
retention and expansion; and general market, political, economic and business conditions.
Additional risks and uncertainties that could cause actual outcomes and results to differ materially are included in
our filings with the Securities and Exchange Commission (the “SEC”), including our Annual Report on Form 10-K for
the most recent fiscal year, our quarterly report on Form 10-Q for the most recent fiscal quarter, and any
subsequent reports filed with the SEC. SEC filings are available on the Investor Relations section of Elastic’s
website at ir.elastic.co and the SEC’s website at www.sec.gov.
Any features or functions of services or products referenced in this presentation, or in any presentations, press
releases or public statements, which are not currently available or not currently available as a general availability
release, may not be delivered on time or at all. The development, release, and timing of any features or functionality
described for our products remains at our sole discretion. Customers who purchase our products and services
should make the purchase decisions based upon services and product features and functions that are currently
available.
All statements are made only as of the date of the presentation, and Elastic assumes no obligation to, and does not
currently intend to, update any forward-looking statements or statements relating to features or functions of services
or products, except as required by law.
Forward-Looking Statements
3
Runtime fields in a nutshell
• Empowering all users to generate fields upon need
• Flexibility vs. performance at query time
Schema on read
A Runtime field is a field that is associated with instructions for
calculating it at query time (e.g. script). Runtime fields can be
defined in the mapping or introduced in a query. Other than that
runtime fields behave like any other field in Elasticsearch.
Agenda Slide
What are runtime fields?1
How will runtime fields be implemented?3
Why are runtime fields useful?2
Schema on write
query performance
Extract, Transform, Index
Readiness for immediate query/agg
Advantages:
● Immediate response time
● Flexibility for new docs
Schema on read
flexibility, cost, ingest pace
Load almost raw
Prep per query upon need
Advantages:
● Flexibility for ingested docs
● Start without data/use knowledge
● Improved ingest rate
Schema on write
query performance
Extract, Transform, Index
Readiness for immediate query/agg
Advantages:
● Immediate response time
● Flexibility for new docs
Runtime Fields
Elastic’s schema on read
• Instructions for calculating the
field upon need (e.g. script)
• Defined in the mappings or
introduced in a query
• Smaller index and faster ingest
• Lower query performance
• Other than that - like any other
field
Schema on read
flexibility, cost, ingest pace
Load almost raw
Prep per query upon need
Advantages:
● Flexibility for ingested docs
● Start without data/use knowledge
● Improved ingest rate
Add to mapping
PUT /test {
"mappings": {
"properties": {
"@timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_second"
},
"message": {
"type": "wildcard"
},
"status": {
"type": "runtime",
"runtime_type": "long",
"script": "String m = doc["message"].value; int end = m.lastIndexOf(" "); int start =
m.lastIndexOf(" ", end - 1) + 1; emit(Long.parseLong(m.substring(start, end)));"
}
}
}
POST /test/_doc?refresh
{
"timestamp" : "1998-04-30T14:30:17-05:00" ,
"message" : "40.135.0.0 - -
[1998-04-30T14:30:17-05:00] "GET /images/hm_bg.jpg
HTTP/1.0 " 200 24736"
}
and use like any other field
POST /_async_search
{
"query": {
"bool": {
"must" : [
{ "match": { "status": "200" } },
{
"range" : {
"@timestamp" : { "gte": "1998-05-01T00:00:00Z" , "lt": "1998-05-02T00:00:00Z" }
}
}
]
}
}
}
POST /_async_search
{
"runtime_mappings": {
"ip": {
"type": "runtime",
"runtime_type": "ip",
"script": "String m = doc["message"].value; emit(m.substring(0, m.indexOf(" ")));"
}
},
"query": {
"bool": {
"must": [
{ "range": { "ip": { "gte": "40.135.0.0", "lt": "40.135.255.255" } } },
{ "match": { "status": "200" } },
{ "range": { "@timestamp": { "gte": "1998-05-01T00:00:00Z", "lt": "1998-05-02T00:00:00Z" } } }
]
}
}
}
Query a runtime field defined on the fly
POST /test/_doc?refresh
{
"timestamp" : "1998-04-30T14:30:17-05:00" ,
"message" : "40.135.0.0 - - [1998-04-30T14:30:17-05:00]
"GET /images/hm_bg.jpg HTTP/1.0 " 200 24736"
}
Future enhancements
• Painless script
• Grok patterns
• Query time enrichment
• Source field
Options for defining the function that yields the value in the field
Agenda Slide
Use color to highlight
What are runtime fields?1
How will runtime fields be implemented?3
Why are runtime fields useful?2
Schema on read
Benefits:
– Flexibility in defining the data
– No index footprint (lower TCO
– Improved ingest pace
Extract, transform and index data *only* upon need
Beneficial, but we do have better
mechanisms to help deal with these
Letting analysts define their schema in retrospect
A new field lifecycle
Extract more data
with Runtime fields
Index only @timestamp
The rest as log entry in
_source
Turn frequently
used runtime fields
into indexed fields
Benefits:
● Save time and effort
● Add fields if and when required, without knowing everything in advance
● Only index what you need - save index size - performance and hardware cost
Fix mapping errors
Benefits:
• Fix immediately, without reindexing
• Queries and schema don’t change (performance impacted)
Index Index data for optimal performance
Retrospective
Fix
Identify an error in the ingest instructions and
override the indexed field with runtime field for
indexed documents
Index Index new documents with the revised mapping
Field per context
Query, visualization, or completely ad-hoc
"runtime_mappings": {
"ip": {
"type": "runtime",
"runtime_type": "ip",
"script": "String m =
doc["message"].value;
emit(m.substring(0, m.indexOf(" ")));"
}
Benefits:
• Avoid polluting everyone’s schema with fields that answer a need only for a subset of the users
• Analyze more efficiently with fields designed to answer a specific need
What’s the average size of an article in my index?
I need to know for relevance ranking tuning.
Please don’t add it to everyone’s articles
index… You’re the only one interested in
it, and even you just look at it once a
month.
Autonomy
Anyone is free to create new fields
No collateral
impact
Adding a Runtime field
(not indexed)
Low permission
barrier
Benefits:
● Administrators avoid spending time on creating schema for specific needs
● Employees that are permitted to define their own data structure can achieve
more with fewer resources
Agenda Slide
Use color to highlight
What are runtime fields?1
How will runtime fields be implemented?3
Why are runtime fields useful?2
The complex parts are things we already have
Putting pre-existing mechanisms together
• Calculate a field value per document and do that quickly
– Prefered Painless script over ingest processor adaptation
• Index to rely on for the heavy lifting
• Logic to minimize the cases in which the calculation is performed
• Async search to deal with slow queries
Async Queries
Robustness to
slow queries
Sync search
Query
Results
or or
Query
Partial
Results & ID
Call w.
ID
Complete
Result set
Timeout
Query
Query
Results
Async search
Efficient calculation at query time
• Calculate only upon need
– Aggregations
– Filter only after filtering by indexed fields
– Display fields for top documents per query
• Initial performance tests prove the important of indexed timestamp
23
Matching is done by the query
Only extract and transform are
made with a script
Define a field with the script
PUT /test {
"mappings": {
"properties": {
"@timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_second"
},
"message": {
"type": "wildcard"
},
"status": {
"type": "runtime",
"runtime_type": "long",
"script": "String m = doc["message"].value; int end = m.lastIndexOf(" "); int start =
m.lastIndexOf(" ", end - 1) + 1; emit(Long.parseLong(m.substring(start, end)));"
}
}
}
POST /test/_doc?refresh
{
"timestamp" : "1998-04-30T14:30:17-05:00" ,
"message" : "40.135.0.0 - -
[1998-04-30T14:30:17-05:00] "GET /images/hm_bg.jpg
HTTP/1.0 " 200 24736"
}
Matching logic is in the query
POST /_async_search
{
"query": {
"bool": {
"must" : [
{ "match": { "status": "200" } },
{
"range" : {
"@timestamp" : { "gte": "1998-05-01T00:00:00Z" , "lt": "1998-05-02T00:00:00Z" }
}
}
]
}
}
}
Summary
• Runtime fields - schema on read in Elasticsearch
• Gaining in flexibility, index size and ingest pace, at a cost to
performance
• Leveraging existing mechanisms, e.g. index, async search, painless,
query optimization
• Facilitating new workflows:
– Field per context (query, visualization, schema, etc.)
– Fixing ingest errors in retrospect
– New field creation and ingest workflow: start working and gradually create the
schema
Runtime fields
Coming soon to an
elasticsearch cluster
near you
27
Thank You!

Weitere ähnliche Inhalte

Was ist angesagt?

LCA and RMQ ~簡潔もあるよ!~
LCA and RMQ ~簡潔もあるよ!~LCA and RMQ ~簡潔もあるよ!~
LCA and RMQ ~簡潔もあるよ!~Yuma Inoue
 
Tutorial - Modern Real Time Streaming Architectures
Tutorial - Modern Real Time Streaming ArchitecturesTutorial - Modern Real Time Streaming Architectures
Tutorial - Modern Real Time Streaming ArchitecturesKarthik Ramasamy
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentUsing the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentFlink Forward
 
Indeedなう A日程 解説
Indeedなう A日程 解説Indeedなう A日程 解説
Indeedなう A日程 解説AtCoder Inc.
 
AtCoder Beginner Contest 035 解説
AtCoder Beginner Contest 035 解説AtCoder Beginner Contest 035 解説
AtCoder Beginner Contest 035 解説AtCoder Inc.
 
How to Extend Apache Spark with Customized Optimizations
How to Extend Apache Spark with Customized OptimizationsHow to Extend Apache Spark with Customized Optimizations
How to Extend Apache Spark with Customized OptimizationsDatabricks
 
Business Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache AirflowBusiness Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache AirflowRomain Dorgueil
 
区間分割の仕方を最適化する動的計画法 (JOI 2021 夏季セミナー)
区間分割の仕方を最適化する動的計画法 (JOI 2021 夏季セミナー)区間分割の仕方を最適化する動的計画法 (JOI 2021 夏季セミナー)
区間分割の仕方を最適化する動的計画法 (JOI 2021 夏季セミナー)Kensuke Otsuki
 
Introduction to Datasource V2 API
Introduction to Datasource V2 APIIntroduction to Datasource V2 API
Introduction to Datasource V2 APIdatamantra
 
機械学習を用いた仕様書からのテストケース自動生成ツールSpec2Testの試作
機械学習を用いた仕様書からのテストケース自動生成ツールSpec2Testの試作機械学習を用いた仕様書からのテストケース自動生成ツールSpec2Testの試作
機械学習を用いた仕様書からのテストケース自動生成ツールSpec2Testの試作Futa HIRAKOBA
 
組み込み関数(intrinsic)によるSIMD入門
組み込み関数(intrinsic)によるSIMD入門組み込み関数(intrinsic)によるSIMD入門
組み込み関数(intrinsic)によるSIMD入門Norishige Fukushima
 
AtCoder Regular Contest 046
AtCoder Regular Contest 046AtCoder Regular Contest 046
AtCoder Regular Contest 046AtCoder Inc.
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesArun Gupta
 
AtCoder Regular Contest 040 解説
AtCoder Regular Contest 040 解説AtCoder Regular Contest 040 解説
AtCoder Regular Contest 040 解説AtCoder Inc.
 
NoSQL databases, the CAP theorem, and the theory of relativity
NoSQL databases, the CAP theorem, and the theory of relativityNoSQL databases, the CAP theorem, and the theory of relativity
NoSQL databases, the CAP theorem, and the theory of relativityLars Marius Garshol
 

Was ist angesagt? (20)

文字列アルゴリズム
文字列アルゴリズム文字列アルゴリズム
文字列アルゴリズム
 
TLA+についての話
TLA+についての話TLA+についての話
TLA+についての話
 
LCA and RMQ ~簡潔もあるよ!~
LCA and RMQ ~簡潔もあるよ!~LCA and RMQ ~簡潔もあるよ!~
LCA and RMQ ~簡潔もあるよ!~
 
Tutorial - Modern Real Time Streaming Architectures
Tutorial - Modern Real Time Streaming ArchitecturesTutorial - Modern Real Time Streaming Architectures
Tutorial - Modern Real Time Streaming Architectures
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentUsing the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production Deployment
 
Indeedなう A日程 解説
Indeedなう A日程 解説Indeedなう A日程 解説
Indeedなう A日程 解説
 
明日使えないすごいビット演算
明日使えないすごいビット演算明日使えないすごいビット演算
明日使えないすごいビット演算
 
AtCoder Beginner Contest 035 解説
AtCoder Beginner Contest 035 解説AtCoder Beginner Contest 035 解説
AtCoder Beginner Contest 035 解説
 
How to Extend Apache Spark with Customized Optimizations
How to Extend Apache Spark with Customized OptimizationsHow to Extend Apache Spark with Customized Optimizations
How to Extend Apache Spark with Customized Optimizations
 
Business Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache AirflowBusiness Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache Airflow
 
区間分割の仕方を最適化する動的計画法 (JOI 2021 夏季セミナー)
区間分割の仕方を最適化する動的計画法 (JOI 2021 夏季セミナー)区間分割の仕方を最適化する動的計画法 (JOI 2021 夏季セミナー)
区間分割の仕方を最適化する動的計画法 (JOI 2021 夏季セミナー)
 
Introduction to Datasource V2 API
Introduction to Datasource V2 APIIntroduction to Datasource V2 API
Introduction to Datasource V2 API
 
集約署名
集約署名集約署名
集約署名
 
機械学習を用いた仕様書からのテストケース自動生成ツールSpec2Testの試作
機械学習を用いた仕様書からのテストケース自動生成ツールSpec2Testの試作機械学習を用いた仕様書からのテストケース自動生成ツールSpec2Testの試作
機械学習を用いた仕様書からのテストケース自動生成ツールSpec2Testの試作
 
組み込み関数(intrinsic)によるSIMD入門
組み込み関数(intrinsic)によるSIMD入門組み込み関数(intrinsic)によるSIMD入門
組み込み関数(intrinsic)によるSIMD入門
 
AtCoder Regular Contest 046
AtCoder Regular Contest 046AtCoder Regular Contest 046
AtCoder Regular Contest 046
 
CockroachDB
CockroachDBCockroachDB
CockroachDB
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
AtCoder Regular Contest 040 解説
AtCoder Regular Contest 040 解説AtCoder Regular Contest 040 解説
AtCoder Regular Contest 040 解説
 
NoSQL databases, the CAP theorem, and the theory of relativity
NoSQL databases, the CAP theorem, and the theory of relativityNoSQL databases, the CAP theorem, and the theory of relativity
NoSQL databases, the CAP theorem, and the theory of relativity
 

Ähnlich wie Schema on read with runtime fields

Why you should use Elastic for infrastructure metrics
Why you should use Elastic for infrastructure metricsWhy you should use Elastic for infrastructure metrics
Why you should use Elastic for infrastructure metricsElasticsearch
 
Centralized logging in a changing environment at the UK’s DVLA
Centralized logging in a changing environment at the UK’s DVLACentralized logging in a changing environment at the UK’s DVLA
Centralized logging in a changing environment at the UK’s DVLAElasticsearch
 
Case Study - Upgrading to the Next Gen User Interface for Documentum- final
Case Study - Upgrading to the Next Gen User Interface for Documentum- finalCase Study - Upgrading to the Next Gen User Interface for Documentum- final
Case Study - Upgrading to the Next Gen User Interface for Documentum- finalBrian Nace
 
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...CodeScience
 
Unlock your core business assets for the hybrid cloud with addi webinar dec...
Unlock your core business assets for the hybrid cloud with addi   webinar dec...Unlock your core business assets for the hybrid cloud with addi   webinar dec...
Unlock your core business assets for the hybrid cloud with addi webinar dec...Sherri Hanna
 
How Zebra Technologies delivers business intelligence with Elastic on Google ...
How Zebra Technologies delivers business intelligence with Elastic on Google ...How Zebra Technologies delivers business intelligence with Elastic on Google ...
How Zebra Technologies delivers business intelligence with Elastic on Google ...Elasticsearch
 
Elastic Stack: Using data for insight and action
Elastic Stack: Using data for insight and actionElastic Stack: Using data for insight and action
Elastic Stack: Using data for insight and actionElasticsearch
 
Archana_Yadav_Resume
Archana_Yadav_ResumeArchana_Yadav_Resume
Archana_Yadav_Resumearchana yadav
 
Archana_Yadav_Resume
Archana_Yadav_ResumeArchana_Yadav_Resume
Archana_Yadav_Resumearchana yadav
 
Project Management (Practical Qustion Paper) [CBSGS - 75:25 Pattern] {2013-20...
Project Management (Practical Qustion Paper) [CBSGS - 75:25 Pattern] {2013-20...Project Management (Practical Qustion Paper) [CBSGS - 75:25 Pattern] {2013-20...
Project Management (Practical Qustion Paper) [CBSGS - 75:25 Pattern] {2013-20...Mumbai B.Sc.IT Study
 
ApexUnit: Open source test framework for apex
ApexUnit: Open source test framework for apexApexUnit: Open source test framework for apex
ApexUnit: Open source test framework for apexVamshidhar Gandham
 
What's New Overview for IBM Streams V4.3
What's New Overview for IBM Streams V4.3 What's New Overview for IBM Streams V4.3
What's New Overview for IBM Streams V4.3 lisanl
 
Abhishek_Banerjee_Functional _Testing
Abhishek_Banerjee_Functional _TestingAbhishek_Banerjee_Functional _Testing
Abhishek_Banerjee_Functional _TestingAbhishek Banerjee
 
Abhishek_Banerjee_Functional _Testing
Abhishek_Banerjee_Functional _TestingAbhishek_Banerjee_Functional _Testing
Abhishek_Banerjee_Functional _TestingAbhishek Banerjee
 
Elasticsearch: From development to production in 15 minutes
Elasticsearch: From development to production in 15 minutesElasticsearch: From development to production in 15 minutes
Elasticsearch: From development to production in 15 minutesElasticsearch
 
1) Question Add Targets to Balanced score Card
1) Question  Add Targets to Balanced score Card1) Question  Add Targets to Balanced score Card
1) Question Add Targets to Balanced score CardMartineMccracken314
 
1) Question Add Targets to Balanced score Card
1) Question  Add Targets to Balanced score Card1) Question  Add Targets to Balanced score Card
1) Question Add Targets to Balanced score CardAbbyWhyte974
 

Ähnlich wie Schema on read with runtime fields (20)

Why you should use Elastic for infrastructure metrics
Why you should use Elastic for infrastructure metricsWhy you should use Elastic for infrastructure metrics
Why you should use Elastic for infrastructure metrics
 
Centralized logging in a changing environment at the UK’s DVLA
Centralized logging in a changing environment at the UK’s DVLACentralized logging in a changing environment at the UK’s DVLA
Centralized logging in a changing environment at the UK’s DVLA
 
HR management system
HR management systemHR management system
HR management system
 
Case Study - Upgrading to the Next Gen User Interface for Documentum- final
Case Study - Upgrading to the Next Gen User Interface for Documentum- finalCase Study - Upgrading to the Next Gen User Interface for Documentum- final
Case Study - Upgrading to the Next Gen User Interface for Documentum- final
 
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
Technical Webinar: Patterns for Integrating Your Salesforce App with Off-Plat...
 
Unlock your core business assets for the hybrid cloud with addi webinar dec...
Unlock your core business assets for the hybrid cloud with addi   webinar dec...Unlock your core business assets for the hybrid cloud with addi   webinar dec...
Unlock your core business assets for the hybrid cloud with addi webinar dec...
 
How Zebra Technologies delivers business intelligence with Elastic on Google ...
How Zebra Technologies delivers business intelligence with Elastic on Google ...How Zebra Technologies delivers business intelligence with Elastic on Google ...
How Zebra Technologies delivers business intelligence with Elastic on Google ...
 
PAC Fast Track Implementation Program
PAC Fast Track Implementation ProgramPAC Fast Track Implementation Program
PAC Fast Track Implementation Program
 
Elastic Stack: Using data for insight and action
Elastic Stack: Using data for insight and actionElastic Stack: Using data for insight and action
Elastic Stack: Using data for insight and action
 
Archana_Yadav_Resume
Archana_Yadav_ResumeArchana_Yadav_Resume
Archana_Yadav_Resume
 
Archana_Yadav_Resume
Archana_Yadav_ResumeArchana_Yadav_Resume
Archana_Yadav_Resume
 
Project Management (Practical Qustion Paper) [CBSGS - 75:25 Pattern] {2013-20...
Project Management (Practical Qustion Paper) [CBSGS - 75:25 Pattern] {2013-20...Project Management (Practical Qustion Paper) [CBSGS - 75:25 Pattern] {2013-20...
Project Management (Practical Qustion Paper) [CBSGS - 75:25 Pattern] {2013-20...
 
ApexUnit: Open source test framework for apex
ApexUnit: Open source test framework for apexApexUnit: Open source test framework for apex
ApexUnit: Open source test framework for apex
 
What's New Overview for IBM Streams V4.3
What's New Overview for IBM Streams V4.3 What's New Overview for IBM Streams V4.3
What's New Overview for IBM Streams V4.3
 
Abhishek_Banerjee_Functional _Testing
Abhishek_Banerjee_Functional _TestingAbhishek_Banerjee_Functional _Testing
Abhishek_Banerjee_Functional _Testing
 
Abhishek_Banerjee_Functional _Testing
Abhishek_Banerjee_Functional _TestingAbhishek_Banerjee_Functional _Testing
Abhishek_Banerjee_Functional _Testing
 
Elasticsearch: From development to production in 15 minutes
Elasticsearch: From development to production in 15 minutesElasticsearch: From development to production in 15 minutes
Elasticsearch: From development to production in 15 minutes
 
Business Technology Brief
Business Technology BriefBusiness Technology Brief
Business Technology Brief
 
1) Question Add Targets to Balanced score Card
1) Question  Add Targets to Balanced score Card1) Question  Add Targets to Balanced score Card
1) Question Add Targets to Balanced score Card
 
1) Question Add Targets to Balanced score Card
1) Question  Add Targets to Balanced score Card1) Question  Add Targets to Balanced score Card
1) Question Add Targets to Balanced score Card
 

Mehr von Elasticsearch

An introduction to Elasticsearch's advanced relevance ranking toolbox
An introduction to Elasticsearch's advanced relevance ranking toolboxAn introduction to Elasticsearch's advanced relevance ranking toolbox
An introduction to Elasticsearch's advanced relevance ranking toolboxElasticsearch
 
From MSP to MSSP using Elastic
From MSP to MSSP using ElasticFrom MSP to MSSP using Elastic
From MSP to MSSP using ElasticElasticsearch
 
Cómo crear excelentes experiencias de búsqueda en sitios web
Cómo crear excelentes experiencias de búsqueda en sitios webCómo crear excelentes experiencias de búsqueda en sitios web
Cómo crear excelentes experiencias de búsqueda en sitios webElasticsearch
 
Te damos la bienvenida a una nueva forma de realizar búsquedas
Te damos la bienvenida a una nueva forma de realizar búsquedas Te damos la bienvenida a una nueva forma de realizar búsquedas
Te damos la bienvenida a una nueva forma de realizar búsquedas Elasticsearch
 
Tirez pleinement parti d'Elastic grâce à Elastic Cloud
Tirez pleinement parti d'Elastic grâce à Elastic CloudTirez pleinement parti d'Elastic grâce à Elastic Cloud
Tirez pleinement parti d'Elastic grâce à Elastic CloudElasticsearch
 
Comment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesComment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesElasticsearch
 
Plongez au cœur de la recherche dans tous ses états.
Plongez au cœur de la recherche dans tous ses états.Plongez au cœur de la recherche dans tous ses états.
Plongez au cœur de la recherche dans tous ses états.Elasticsearch
 
Modernising One Legal Se@rch with Elastic Enterprise Search [Customer Story]
Modernising One Legal Se@rch with Elastic Enterprise Search [Customer Story]Modernising One Legal Se@rch with Elastic Enterprise Search [Customer Story]
Modernising One Legal Se@rch with Elastic Enterprise Search [Customer Story]Elasticsearch
 
An introduction to Elasticsearch's advanced relevance ranking toolbox
An introduction to Elasticsearch's advanced relevance ranking toolboxAn introduction to Elasticsearch's advanced relevance ranking toolbox
An introduction to Elasticsearch's advanced relevance ranking toolboxElasticsearch
 
Welcome to a new state of find
Welcome to a new state of findWelcome to a new state of find
Welcome to a new state of findElasticsearch
 
Building great website search experiences
Building great website search experiencesBuilding great website search experiences
Building great website search experiencesElasticsearch
 
Keynote: Harnessing the power of Elasticsearch for simplified search
Keynote: Harnessing the power of Elasticsearch for simplified searchKeynote: Harnessing the power of Elasticsearch for simplified search
Keynote: Harnessing the power of Elasticsearch for simplified searchElasticsearch
 
Cómo transformar los datos en análisis con los que tomar decisiones
Cómo transformar los datos en análisis con los que tomar decisionesCómo transformar los datos en análisis con los que tomar decisiones
Cómo transformar los datos en análisis con los que tomar decisionesElasticsearch
 
Explore relève les défis Big Data avec Elastic Cloud
Explore relève les défis Big Data avec Elastic Cloud Explore relève les défis Big Data avec Elastic Cloud
Explore relève les défis Big Data avec Elastic Cloud Elasticsearch
 
Comment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesComment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesElasticsearch
 
Transforming data into actionable insights
Transforming data into actionable insightsTransforming data into actionable insights
Transforming data into actionable insightsElasticsearch
 
Opening Keynote: Why Elastic?
Opening Keynote: Why Elastic?Opening Keynote: Why Elastic?
Opening Keynote: Why Elastic?Elasticsearch
 
Empowering agencies using Elastic as a Service inside Government
Empowering agencies using Elastic as a Service inside GovernmentEmpowering agencies using Elastic as a Service inside Government
Empowering agencies using Elastic as a Service inside GovernmentElasticsearch
 
The opportunities and challenges of data for public good
The opportunities and challenges of data for public goodThe opportunities and challenges of data for public good
The opportunities and challenges of data for public goodElasticsearch
 
Enterprise search and unstructured data with CGI and Elastic
Enterprise search and unstructured data with CGI and ElasticEnterprise search and unstructured data with CGI and Elastic
Enterprise search and unstructured data with CGI and ElasticElasticsearch
 

Mehr von Elasticsearch (20)

An introduction to Elasticsearch's advanced relevance ranking toolbox
An introduction to Elasticsearch's advanced relevance ranking toolboxAn introduction to Elasticsearch's advanced relevance ranking toolbox
An introduction to Elasticsearch's advanced relevance ranking toolbox
 
From MSP to MSSP using Elastic
From MSP to MSSP using ElasticFrom MSP to MSSP using Elastic
From MSP to MSSP using Elastic
 
Cómo crear excelentes experiencias de búsqueda en sitios web
Cómo crear excelentes experiencias de búsqueda en sitios webCómo crear excelentes experiencias de búsqueda en sitios web
Cómo crear excelentes experiencias de búsqueda en sitios web
 
Te damos la bienvenida a una nueva forma de realizar búsquedas
Te damos la bienvenida a una nueva forma de realizar búsquedas Te damos la bienvenida a una nueva forma de realizar búsquedas
Te damos la bienvenida a una nueva forma de realizar búsquedas
 
Tirez pleinement parti d'Elastic grâce à Elastic Cloud
Tirez pleinement parti d'Elastic grâce à Elastic CloudTirez pleinement parti d'Elastic grâce à Elastic Cloud
Tirez pleinement parti d'Elastic grâce à Elastic Cloud
 
Comment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesComment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitables
 
Plongez au cœur de la recherche dans tous ses états.
Plongez au cœur de la recherche dans tous ses états.Plongez au cœur de la recherche dans tous ses états.
Plongez au cœur de la recherche dans tous ses états.
 
Modernising One Legal Se@rch with Elastic Enterprise Search [Customer Story]
Modernising One Legal Se@rch with Elastic Enterprise Search [Customer Story]Modernising One Legal Se@rch with Elastic Enterprise Search [Customer Story]
Modernising One Legal Se@rch with Elastic Enterprise Search [Customer Story]
 
An introduction to Elasticsearch's advanced relevance ranking toolbox
An introduction to Elasticsearch's advanced relevance ranking toolboxAn introduction to Elasticsearch's advanced relevance ranking toolbox
An introduction to Elasticsearch's advanced relevance ranking toolbox
 
Welcome to a new state of find
Welcome to a new state of findWelcome to a new state of find
Welcome to a new state of find
 
Building great website search experiences
Building great website search experiencesBuilding great website search experiences
Building great website search experiences
 
Keynote: Harnessing the power of Elasticsearch for simplified search
Keynote: Harnessing the power of Elasticsearch for simplified searchKeynote: Harnessing the power of Elasticsearch for simplified search
Keynote: Harnessing the power of Elasticsearch for simplified search
 
Cómo transformar los datos en análisis con los que tomar decisiones
Cómo transformar los datos en análisis con los que tomar decisionesCómo transformar los datos en análisis con los que tomar decisiones
Cómo transformar los datos en análisis con los que tomar decisiones
 
Explore relève les défis Big Data avec Elastic Cloud
Explore relève les défis Big Data avec Elastic Cloud Explore relève les défis Big Data avec Elastic Cloud
Explore relève les défis Big Data avec Elastic Cloud
 
Comment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesComment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitables
 
Transforming data into actionable insights
Transforming data into actionable insightsTransforming data into actionable insights
Transforming data into actionable insights
 
Opening Keynote: Why Elastic?
Opening Keynote: Why Elastic?Opening Keynote: Why Elastic?
Opening Keynote: Why Elastic?
 
Empowering agencies using Elastic as a Service inside Government
Empowering agencies using Elastic as a Service inside GovernmentEmpowering agencies using Elastic as a Service inside Government
Empowering agencies using Elastic as a Service inside Government
 
The opportunities and challenges of data for public good
The opportunities and challenges of data for public goodThe opportunities and challenges of data for public good
The opportunities and challenges of data for public good
 
Enterprise search and unstructured data with CGI and Elastic
Enterprise search and unstructured data with CGI and ElasticEnterprise search and unstructured data with CGI and Elastic
Enterprise search and unstructured data with CGI and Elastic
 

Kürzlich hochgeladen

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Kürzlich hochgeladen (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

Schema on read with runtime fields

  • 1. 1 Runtime Fields Gilad Gal Product Manager, Elasticsearch
  • 2. 2 This presentation and the accompanying oral presentation contain forward-looking statements, including statements concerning plans for future offerings; the expected strength, performance or benefits of our offerings; and our future operations and expected performance. These forward-looking statements are subject to the safe harbor provisions under the Private Securities Litigation Reform Act of 1995. Our expectations and beliefs in light of currently available information regarding these matters may not materialize. Actual outcomes and results may differ materially from those contemplated by these forward-looking statements due to uncertainties, risks, and changes in circumstances, including, but not limited to those related to: the impact of the COVID-19 pandemic on our business and our customers and partners; our ability to continue to deliver and improve our offerings and successfully develop new offerings, including security-related product offerings and SaaS offerings; customer acceptance and purchase of our existing offerings and new offerings, including the expansion and adoption of our SaaS offerings; our ability to realize value from investments in the business, including R&D investments; our ability to maintain and expand our user and customer base; our international expansion strategy; our ability to successfully execute our go-to-market strategy and expand in our existing markets and into new markets, and our ability to forecast customer retention and expansion; and general market, political, economic and business conditions. Additional risks and uncertainties that could cause actual outcomes and results to differ materially are included in our filings with the Securities and Exchange Commission (the “SEC”), including our Annual Report on Form 10-K for the most recent fiscal year, our quarterly report on Form 10-Q for the most recent fiscal quarter, and any subsequent reports filed with the SEC. SEC filings are available on the Investor Relations section of Elastic’s website at ir.elastic.co and the SEC’s website at www.sec.gov. Any features or functions of services or products referenced in this presentation, or in any presentations, press releases or public statements, which are not currently available or not currently available as a general availability release, may not be delivered on time or at all. The development, release, and timing of any features or functionality described for our products remains at our sole discretion. Customers who purchase our products and services should make the purchase decisions based upon services and product features and functions that are currently available. All statements are made only as of the date of the presentation, and Elastic assumes no obligation to, and does not currently intend to, update any forward-looking statements or statements relating to features or functions of services or products, except as required by law. Forward-Looking Statements
  • 3. 3 Runtime fields in a nutshell • Empowering all users to generate fields upon need • Flexibility vs. performance at query time Schema on read A Runtime field is a field that is associated with instructions for calculating it at query time (e.g. script). Runtime fields can be defined in the mapping or introduced in a query. Other than that runtime fields behave like any other field in Elasticsearch.
  • 4. Agenda Slide What are runtime fields?1 How will runtime fields be implemented?3 Why are runtime fields useful?2
  • 5. Schema on write query performance Extract, Transform, Index Readiness for immediate query/agg Advantages: ● Immediate response time ● Flexibility for new docs
  • 6. Schema on read flexibility, cost, ingest pace Load almost raw Prep per query upon need Advantages: ● Flexibility for ingested docs ● Start without data/use knowledge ● Improved ingest rate Schema on write query performance Extract, Transform, Index Readiness for immediate query/agg Advantages: ● Immediate response time ● Flexibility for new docs
  • 7. Runtime Fields Elastic’s schema on read • Instructions for calculating the field upon need (e.g. script) • Defined in the mappings or introduced in a query • Smaller index and faster ingest • Lower query performance • Other than that - like any other field Schema on read flexibility, cost, ingest pace Load almost raw Prep per query upon need Advantages: ● Flexibility for ingested docs ● Start without data/use knowledge ● Improved ingest rate
  • 8. Add to mapping PUT /test { "mappings": { "properties": { "@timestamp": { "type": "date", "format": "strict_date_optional_time||epoch_second" }, "message": { "type": "wildcard" }, "status": { "type": "runtime", "runtime_type": "long", "script": "String m = doc["message"].value; int end = m.lastIndexOf(" "); int start = m.lastIndexOf(" ", end - 1) + 1; emit(Long.parseLong(m.substring(start, end)));" } } } POST /test/_doc?refresh { "timestamp" : "1998-04-30T14:30:17-05:00" , "message" : "40.135.0.0 - - [1998-04-30T14:30:17-05:00] "GET /images/hm_bg.jpg HTTP/1.0 " 200 24736" }
  • 9. and use like any other field POST /_async_search { "query": { "bool": { "must" : [ { "match": { "status": "200" } }, { "range" : { "@timestamp" : { "gte": "1998-05-01T00:00:00Z" , "lt": "1998-05-02T00:00:00Z" } } } ] } } }
  • 10. POST /_async_search { "runtime_mappings": { "ip": { "type": "runtime", "runtime_type": "ip", "script": "String m = doc["message"].value; emit(m.substring(0, m.indexOf(" ")));" } }, "query": { "bool": { "must": [ { "range": { "ip": { "gte": "40.135.0.0", "lt": "40.135.255.255" } } }, { "match": { "status": "200" } }, { "range": { "@timestamp": { "gte": "1998-05-01T00:00:00Z", "lt": "1998-05-02T00:00:00Z" } } } ] } } } Query a runtime field defined on the fly POST /test/_doc?refresh { "timestamp" : "1998-04-30T14:30:17-05:00" , "message" : "40.135.0.0 - - [1998-04-30T14:30:17-05:00] "GET /images/hm_bg.jpg HTTP/1.0 " 200 24736" }
  • 11. Future enhancements • Painless script • Grok patterns • Query time enrichment • Source field Options for defining the function that yields the value in the field
  • 12. Agenda Slide Use color to highlight What are runtime fields?1 How will runtime fields be implemented?3 Why are runtime fields useful?2
  • 13. Schema on read Benefits: – Flexibility in defining the data – No index footprint (lower TCO – Improved ingest pace Extract, transform and index data *only* upon need Beneficial, but we do have better mechanisms to help deal with these Letting analysts define their schema in retrospect
  • 14. A new field lifecycle Extract more data with Runtime fields Index only @timestamp The rest as log entry in _source Turn frequently used runtime fields into indexed fields Benefits: ● Save time and effort ● Add fields if and when required, without knowing everything in advance ● Only index what you need - save index size - performance and hardware cost
  • 15. Fix mapping errors Benefits: • Fix immediately, without reindexing • Queries and schema don’t change (performance impacted) Index Index data for optimal performance Retrospective Fix Identify an error in the ingest instructions and override the indexed field with runtime field for indexed documents Index Index new documents with the revised mapping
  • 16. Field per context Query, visualization, or completely ad-hoc "runtime_mappings": { "ip": { "type": "runtime", "runtime_type": "ip", "script": "String m = doc["message"].value; emit(m.substring(0, m.indexOf(" ")));" } Benefits: • Avoid polluting everyone’s schema with fields that answer a need only for a subset of the users • Analyze more efficiently with fields designed to answer a specific need What’s the average size of an article in my index? I need to know for relevance ranking tuning. Please don’t add it to everyone’s articles index… You’re the only one interested in it, and even you just look at it once a month.
  • 17. Autonomy Anyone is free to create new fields No collateral impact Adding a Runtime field (not indexed) Low permission barrier Benefits: ● Administrators avoid spending time on creating schema for specific needs ● Employees that are permitted to define their own data structure can achieve more with fewer resources
  • 18. Agenda Slide Use color to highlight What are runtime fields?1 How will runtime fields be implemented?3 Why are runtime fields useful?2
  • 19. The complex parts are things we already have Putting pre-existing mechanisms together • Calculate a field value per document and do that quickly – Prefered Painless script over ingest processor adaptation • Index to rely on for the heavy lifting • Logic to minimize the cases in which the calculation is performed • Async search to deal with slow queries
  • 21. Sync search Query Results or or Query Partial Results & ID Call w. ID Complete Result set Timeout Query Query Results Async search
  • 22. Efficient calculation at query time • Calculate only upon need – Aggregations – Filter only after filtering by indexed fields – Display fields for top documents per query • Initial performance tests prove the important of indexed timestamp
  • 23. 23 Matching is done by the query Only extract and transform are made with a script
  • 24. Define a field with the script PUT /test { "mappings": { "properties": { "@timestamp": { "type": "date", "format": "strict_date_optional_time||epoch_second" }, "message": { "type": "wildcard" }, "status": { "type": "runtime", "runtime_type": "long", "script": "String m = doc["message"].value; int end = m.lastIndexOf(" "); int start = m.lastIndexOf(" ", end - 1) + 1; emit(Long.parseLong(m.substring(start, end)));" } } } POST /test/_doc?refresh { "timestamp" : "1998-04-30T14:30:17-05:00" , "message" : "40.135.0.0 - - [1998-04-30T14:30:17-05:00] "GET /images/hm_bg.jpg HTTP/1.0 " 200 24736" }
  • 25. Matching logic is in the query POST /_async_search { "query": { "bool": { "must" : [ { "match": { "status": "200" } }, { "range" : { "@timestamp" : { "gte": "1998-05-01T00:00:00Z" , "lt": "1998-05-02T00:00:00Z" } } } ] } } }
  • 26. Summary • Runtime fields - schema on read in Elasticsearch • Gaining in flexibility, index size and ingest pace, at a cost to performance • Leveraging existing mechanisms, e.g. index, async search, painless, query optimization • Facilitating new workflows: – Field per context (query, visualization, schema, etc.) – Fixing ingest errors in retrospect – New field creation and ingest workflow: start working and gradually create the schema Runtime fields Coming soon to an elasticsearch cluster near you