SlideShare a Scribd company logo
MadeinNorway
Web
CMS
Nashorn /
"NodeJS"
Security
Framework
Module System
(OSGi)
HTML5
Framework
(Typescript)
Storage
(Elasticsearch)
Enonic Content Repository built on elasticsearch
Storing data
• Git
• Java Content Repository
• Elasticsearch
content repository
_id = 1001
_name = ‘OSLO’
_parent = ROOT
displayName = ‘Oslo’
data.population = 647676
data.area = 454.03
_id = 1001
_name = ‘oslo’
_parent = ROOT
displayName = ‘Oslo’
data.population = 647676
data.area = 454.03
location =
geoPoint(’59.9127300,10.7460900’)
_ID = 1041
_name = ‘elasticon’
_parent = ‘4021’
category = 'conference'
displayName = ‘elasticon'
keywords = ['ELK', elasticsearch’]
location = ref(2)
description = ‘largest gathering of
ELK expertise in the world’
content repository
_id = 13
_name = ‘opera.png’
_parent = ‘1001
size = 70056
height = 360
_id = 4021
_name = ‘sf’
_parent = ROOT
displayName = ‘San Francisco’
data.population = 837442
data.area = 600.6
repositories
AccessControl AccessControl AccessControl
Staging support Staging support Staging support
Versioning Versioning Versioning
Search Search Search
myDataRepo myUserRepo myStuffRepo
node versions
BlobStore
_id = 1001
displayName = ‘Oslo’
data.population = 647676
data.area = 454.03
location =
geoPoint(’59.9127300,10.7460900’)
_id = 13
size = 70056
height = 360
width = 1024
_id = 1001
displayName = ‘Oslo’
data.population = 647676
data.area = 454.03
_id = 1041
category = 'conference'
displayName = ‘elasticon'
keywords = ['ELK', elasticsearch’]
location = ref(2)
description = ‘largest gathering of
ELK expertise in the world’
_id = 4021
displayName = ‘San
Francisco’
data.population = 837442
data.area = 600.6
branch
_id = 2
_version = 1
type = ‘city’
displayName = ‘San Francisco’
data.population = 837442
…
_id = 1431-1240-1231-1234
_version = 1
category = 'conference'
name = 'Elasticon'
keywords = ['ELK', elasticsearch’]
…

_id = 1234-1234-1234-1234
_version = 1
displayName = ‘Oslo’
data.population = 647676
…
_id = 1234-1234-1234-1234
_version = 2
displayName = ‘Oslo’
data.population = 647676
location =
geoPoint(’59.9127300,10.7460900’)/
_id = 1010
_version = 1
size = 70056
height = 360
…
/oslo
/oslo/opera.png
/sf
/sf/elasticon
branch: master
branch
_id = 2
_version = 1
type = ‘city’
displayName = ‘San Francisco’
data.population = 837442
…
_id = 1431-1240-1231-1234
_version = 1
category = 'conference'
name = 'Elasticon'
keywords = ['ELK', elasticsearch’]
…

_id = 1234-1234-1234-1234
_version = 1
displayName = ‘Oslo’
data.population = 647676
…
branch: master
/
/oslo
branch: myDrafts
_id = 1234-1234-1234-1234
_version = 2
displayName = ‘Oslo’
data.population = 647676
location =
geoPoint(’59.9127300,10.7460900’)/
_id = 1010
_version = 1
size = 70056
height = 360
…
/oslo
/oslo/opera.png
/sf
/sf/elasticon
/sf
/elasticon
branch: push
_id = 2
_version = 1
type = ‘city’
displayName = ‘San Francisco’
data.population = 837442
…
_id = 1431-1240-1231-1234
_version = 1
category = 'conference'
name = 'Elasticon'
keywords = ['ELK', elasticsearch’]
…

_id = 1234-1234-1234-1234
_version = 1
displayName = ‘Oslo’
data.population = 647676
…
branch: masterbranch: myDrafts
_id = 1234-1234-1234-1234
_version = 2
displayName = ‘Oslo’
data.population = 647676
location =
geoPoint(’59.9127300,10.7460900’)/
_id = 1010
_version = 1
size = 70056
height = 360
…
/oslo
/oslo/opera.png
/sf
/sf/elasticon
/
/oslo
/oslo/opera.png
/sf
/sf/elasticon
indices
store-indices search-indices
store
search-index
type : version
type : branch
search
store-index search-index
type: branch-1
type : branch-2
type : branch-n
mapping
Nodes are schema-less
indexField = property-path + value type
mapping cont.
• myProperty (String)
• myProperty._analyzed
• myProperty._ngram
• myProperty._number
• myProperty._geoPoint
• myProperty._orderBy
string mapping
“name": “san-fancisco”
“name._orderby": “san-fancisco"
name = ‘san-fancisco’
text mapping
“description": “this is…”
“description._fulltext": “this is…”
“description._ngram": “this is…"
“description._orderby": “this is…"
description = ‘this is the description’
Numeric mapping
“data.area": “600.6”
“data.area._number”: 600.6
“data.area._orderby": “dc082c4cccccccccd"
data.area = 600.6
ES AggregationsES Queries
search
ES Filters
Enonic XP Query-language
Enonic XP Search API
javascript API
execute('content.query', {
"count": 100,
"start": 0,
"query": "fulltext('myField', 'searching for cheese', 'AND')",
"filter": “type=‘article’",
"aggregations": {
"genders": {
"terms": {
"field": "gender",
"order": "_count asc",
"size": 2
}
}
}
});
query-language
title LIKE ‘elast*’ OR
category IN (‘conference’, ‘event’)
ORDER BY title ASC
query-language
{
"from" : 0,
"size" : 10,
"query" : {
"filtered" : {
"query" : {
"bool" : {
"should" : [ {
"wildcard" : {
"title" : { "wildcard" : “elast*” }
}
}, {
"bool" : {
"should" : [ {
"term" : { "category" : "conference" }
}, {
"term" : { “category" : “event" }
} ]
}
} ]
}
},
"filter" : {
"terms" : {
"_permissions.read" : [ "role:system.authenticated", "user:system:test-user" ]
}
}
}
},
"sort" : [ {
"title._orderby" : {
"order" : "asc",
"ignore_unmapped" : true
}
} ]
}
query-language
category = ‘conference’
AND ngram(‘description’, ‘elast elk’, ‘OR’)
query-language
{
"from" : 0,
"size" : 10,
"query" : {
"filtered" : {
"query" : {
"bool" : {
"must" : [ {
"term" : {
"category" : "conference"
}
}, {
"simple_query_string" : {
"query" : "elast elk",
"fields" : [ "description._ngram" ],
"default_operator" : "or"
}
} ]
}
},
"filter" : {
"terms" : {
"_permissions.read" : [ "role:system.authenticated", "user:system:test-user" ]
}
}
}
}
}
security
• _permissions.create
• _permissions.delete
• _permissions.modify
• _permissions.publish
• _permissions.read
• _permissions.readpermissions
• _permissions.writepermissions
security filter
"filter" : {
"terms" : {
"_permissions.read" : [
"role:system.authenticated",
"user:system:test-user"
"group:system:my-group" ]
}
}
questions?
github.com/enonic/xp

More Related Content

PPTX
Docker & Azure
PDF
MySQL Without The SQL -- Oh My! PHP Detroit July 2018
PPTX
Introduction to MongoDB
PDF
Starting with MongoDB
PDF
Code Camp - Building a Glass app with Wakanda
PDF
An introduction to Scala.js
PDF
Geospatial and MongoDB
Docker & Azure
MySQL Without The SQL -- Oh My! PHP Detroit July 2018
Introduction to MongoDB
Starting with MongoDB
Code Camp - Building a Glass app with Wakanda
An introduction to Scala.js
Geospatial and MongoDB

What's hot (8)

PDF
Geospatial Enhancements in MongoDB 2.4
PDF
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
PDF
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
PPTX
PPTX
D3 Force-Directed Graphs
KEY
MongoDB at GUL
PDF
Сергей Матвеенко: MongoEngine: NoORM for NoSQL
PPT
jQuery Datatables With MongDb
Geospatial Enhancements in MongoDB 2.4
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
D3 Force-Directed Graphs
MongoDB at GUL
Сергей Матвеенко: MongoEngine: NoORM for NoSQL
jQuery Datatables With MongDb
Ad

Viewers also liked (16)

PPTX
Keyboard wizard
PPTX
Elastic{on} - Tracking of events within ING
PDF
Changing Your Mindset: Getting Started With Test-Driven Development
KEY
Getting Started with MongoDB and Node.js
PPTX
Getting Started With Agile
PDF
Version Control with SVN
PPTX
Tuning Elasticsearch Indexing Pipeline for Logs
ODP
Svn Basic Tutorial
PDF
Introduction to Elasticsearch
PDF
[2D1]Elasticsearch 성능 최적화
PDF
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
PDF
21 LinkedIn Profile Tips to Advance Your Content Marketing Career
PPTX
ElasticSearch Basic Introduction
PPTX
All About Me Powerpoint
PPTX
About Me PowerPoint Presentation
PPTX
An Introduction to Elastic Search.
Keyboard wizard
Elastic{on} - Tracking of events within ING
Changing Your Mindset: Getting Started With Test-Driven Development
Getting Started with MongoDB and Node.js
Getting Started With Agile
Version Control with SVN
Tuning Elasticsearch Indexing Pipeline for Logs
Svn Basic Tutorial
Introduction to Elasticsearch
[2D1]Elasticsearch 성능 최적화
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
21 LinkedIn Profile Tips to Advance Your Content Marketing Career
ElasticSearch Basic Introduction
All About Me Powerpoint
About Me PowerPoint Presentation
An Introduction to Elastic Search.
Ad

Similar to Enonic Content Repository built on elasticsearch (20)

PPTX
NoSQL in SQL - Lior Altarescu
PPTX
Working with NoSQL in a SQL Database (XDevApi)
PPTX
EVOLVE'16 | Enhance | Oscar Bolaños & Justin Edelson | Search All the Things:...
PPTX
Omnisearch in AEM 6.2 - Search All the Things
PDF
Trivadis TechEvent 2016 Polybase challenges Hive relational access to non-rel...
PDF
Elasticsearch and Symfony Integration - Debarko De
PDF
RedisConf18 - Redis and Elasticsearch
PPTX
MySQL Without the SQL - Oh My! -> MySQL Document Store -- Confoo.CA 2019
PDF
Streaming using Kafka Flink & Elasticsearch
PDF
MySQL flexible schema and JSON for Internet of Things
PDF
DataFrame: Spark's new abstraction for data science by Reynold Xin of Databricks
PPTX
04 data accesstechnologies
PDF
Elasticsearch War Stories
PDF
FIWARE Global Summit - FIWARE Context Information Management
PPSX
JSON, A Splash of SODA, and a SQL Chaser: Real-World Use Cases for Autonomous...
KEY
Rage Against the Framework
PDF
Webinar: What's New in Solr 6
PDF
Matching Dirty Data
PDF
Hands On Spring Data
NoSQL in SQL - Lior Altarescu
Working with NoSQL in a SQL Database (XDevApi)
EVOLVE'16 | Enhance | Oscar Bolaños & Justin Edelson | Search All the Things:...
Omnisearch in AEM 6.2 - Search All the Things
Trivadis TechEvent 2016 Polybase challenges Hive relational access to non-rel...
Elasticsearch and Symfony Integration - Debarko De
RedisConf18 - Redis and Elasticsearch
MySQL Without the SQL - Oh My! -> MySQL Document Store -- Confoo.CA 2019
Streaming using Kafka Flink & Elasticsearch
MySQL flexible schema and JSON for Internet of Things
DataFrame: Spark's new abstraction for data science by Reynold Xin of Databricks
04 data accesstechnologies
Elasticsearch War Stories
FIWARE Global Summit - FIWARE Context Information Management
JSON, A Splash of SODA, and a SQL Chaser: Real-World Use Cases for Autonomous...
Rage Against the Framework
Webinar: What's New in Solr 6
Matching Dirty Data
Hands On Spring Data

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Big Data Technologies - Introduction.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Cloud computing and distributed systems.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Approach and Philosophy of On baking technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Review of recent advances in non-invasive hemoglobin estimation
MIND Revenue Release Quarter 2 2025 Press Release
Big Data Technologies - Introduction.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Empathic Computing: Creating Shared Understanding
Chapter 3 Spatial Domain Image Processing.pdf
Encapsulation theory and applications.pdf
Cloud computing and distributed systems.
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The AUB Centre for AI in Media Proposal.docx
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Enonic Content Repository built on elasticsearch

  • 4. Storing data • Git • Java Content Repository • Elasticsearch
  • 5. content repository _id = 1001 _name = ‘OSLO’ _parent = ROOT displayName = ‘Oslo’ data.population = 647676 data.area = 454.03 _id = 1001 _name = ‘oslo’ _parent = ROOT displayName = ‘Oslo’ data.population = 647676 data.area = 454.03 location = geoPoint(’59.9127300,10.7460900’) _ID = 1041 _name = ‘elasticon’ _parent = ‘4021’ category = 'conference' displayName = ‘elasticon' keywords = ['ELK', elasticsearch’] location = ref(2) description = ‘largest gathering of ELK expertise in the world’ content repository _id = 13 _name = ‘opera.png’ _parent = ‘1001 size = 70056 height = 360 _id = 4021 _name = ‘sf’ _parent = ROOT displayName = ‘San Francisco’ data.population = 837442 data.area = 600.6
  • 6. repositories AccessControl AccessControl AccessControl Staging support Staging support Staging support Versioning Versioning Versioning Search Search Search myDataRepo myUserRepo myStuffRepo
  • 7. node versions BlobStore _id = 1001 displayName = ‘Oslo’ data.population = 647676 data.area = 454.03 location = geoPoint(’59.9127300,10.7460900’) _id = 13 size = 70056 height = 360 width = 1024 _id = 1001 displayName = ‘Oslo’ data.population = 647676 data.area = 454.03 _id = 1041 category = 'conference' displayName = ‘elasticon' keywords = ['ELK', elasticsearch’] location = ref(2) description = ‘largest gathering of ELK expertise in the world’ _id = 4021 displayName = ‘San Francisco’ data.population = 837442 data.area = 600.6
  • 8. branch _id = 2 _version = 1 type = ‘city’ displayName = ‘San Francisco’ data.population = 837442 … _id = 1431-1240-1231-1234 _version = 1 category = 'conference' name = 'Elasticon' keywords = ['ELK', elasticsearch’] …
 _id = 1234-1234-1234-1234 _version = 1 displayName = ‘Oslo’ data.population = 647676 … _id = 1234-1234-1234-1234 _version = 2 displayName = ‘Oslo’ data.population = 647676 location = geoPoint(’59.9127300,10.7460900’)/ _id = 1010 _version = 1 size = 70056 height = 360 … /oslo /oslo/opera.png /sf /sf/elasticon branch: master
  • 9. branch _id = 2 _version = 1 type = ‘city’ displayName = ‘San Francisco’ data.population = 837442 … _id = 1431-1240-1231-1234 _version = 1 category = 'conference' name = 'Elasticon' keywords = ['ELK', elasticsearch’] …
 _id = 1234-1234-1234-1234 _version = 1 displayName = ‘Oslo’ data.population = 647676 … branch: master / /oslo branch: myDrafts _id = 1234-1234-1234-1234 _version = 2 displayName = ‘Oslo’ data.population = 647676 location = geoPoint(’59.9127300,10.7460900’)/ _id = 1010 _version = 1 size = 70056 height = 360 … /oslo /oslo/opera.png /sf /sf/elasticon /sf /elasticon
  • 10. branch: push _id = 2 _version = 1 type = ‘city’ displayName = ‘San Francisco’ data.population = 837442 … _id = 1431-1240-1231-1234 _version = 1 category = 'conference' name = 'Elasticon' keywords = ['ELK', elasticsearch’] …
 _id = 1234-1234-1234-1234 _version = 1 displayName = ‘Oslo’ data.population = 647676 … branch: masterbranch: myDrafts _id = 1234-1234-1234-1234 _version = 2 displayName = ‘Oslo’ data.population = 647676 location = geoPoint(’59.9127300,10.7460900’)/ _id = 1010 _version = 1 size = 70056 height = 360 … /oslo /oslo/opera.png /sf /sf/elasticon / /oslo /oslo/opera.png /sf /sf/elasticon
  • 14. mapping Nodes are schema-less indexField = property-path + value type
  • 15. mapping cont. • myProperty (String) • myProperty._analyzed • myProperty._ngram • myProperty._number • myProperty._geoPoint • myProperty._orderBy
  • 16. string mapping “name": “san-fancisco” “name._orderby": “san-fancisco" name = ‘san-fancisco’
  • 17. text mapping “description": “this is…” “description._fulltext": “this is…” “description._ngram": “this is…" “description._orderby": “this is…" description = ‘this is the description’
  • 18. Numeric mapping “data.area": “600.6” “data.area._number”: 600.6 “data.area._orderby": “dc082c4cccccccccd" data.area = 600.6
  • 19. ES AggregationsES Queries search ES Filters Enonic XP Query-language Enonic XP Search API
  • 20. javascript API execute('content.query', { "count": 100, "start": 0, "query": "fulltext('myField', 'searching for cheese', 'AND')", "filter": “type=‘article’", "aggregations": { "genders": { "terms": { "field": "gender", "order": "_count asc", "size": 2 } } } });
  • 21. query-language title LIKE ‘elast*’ OR category IN (‘conference’, ‘event’) ORDER BY title ASC
  • 22. query-language { "from" : 0, "size" : 10, "query" : { "filtered" : { "query" : { "bool" : { "should" : [ { "wildcard" : { "title" : { "wildcard" : “elast*” } } }, { "bool" : { "should" : [ { "term" : { "category" : "conference" } }, { "term" : { “category" : “event" } } ] } } ] } }, "filter" : { "terms" : { "_permissions.read" : [ "role:system.authenticated", "user:system:test-user" ] } } } }, "sort" : [ { "title._orderby" : { "order" : "asc", "ignore_unmapped" : true } } ] }
  • 23. query-language category = ‘conference’ AND ngram(‘description’, ‘elast elk’, ‘OR’)
  • 24. query-language { "from" : 0, "size" : 10, "query" : { "filtered" : { "query" : { "bool" : { "must" : [ { "term" : { "category" : "conference" } }, { "simple_query_string" : { "query" : "elast elk", "fields" : [ "description._ngram" ], "default_operator" : "or" } } ] } }, "filter" : { "terms" : { "_permissions.read" : [ "role:system.authenticated", "user:system:test-user" ] } } } } }
  • 25. security • _permissions.create • _permissions.delete • _permissions.modify • _permissions.publish • _permissions.read • _permissions.readpermissions • _permissions.writepermissions
  • 26. security filter "filter" : { "terms" : { "_permissions.read" : [ "role:system.authenticated", "user:system:test-user" "group:system:my-group" ] } }