SlideShare a Scribd company logo
A Presentation by
Content :
   What Is Query Builder?
   Example usages
   Why Query Builder?
   Query Builder Debugger
   Anatomy of a query
   Predicate resolution & execution
   Standard predicates
   Ordering
   Grouping of predicates
   Facets
   Sample Queries
   Javadoc Links
   Query Builder Demo
   References

                                   A Presentation by
What is QueryBuilder
 QueryBuilder    is a service for building Queries searching
  the Java Content Repository and which are easily
  extensible
 A Query represents a JCR repository query that can be
  created programmatically, with a list of so-called
  Predicates
 A Predicate is a single constraint for a Query. It is a pure
  data model object, consisting of a parameter map based
  on key-value string pairs.
 This service allows to create queries with several
  convenience methods
 In addition, it allows to store queries in the repository
  and load them again.

                                   A Presentation by
Example usages




                 A Presentation by
Why Query Builder?
 Because  QueryBuilder is...
   an API to build queries for a query engine (JCR XPath
    underneath)
   especially via URL query parameters (GET & POSTs)
   compatible with HTML forms
   allowing to add/remove conditions (“predicates”)
    individually
   allowing copy/paste of queries
   easily extensible
   providing some goodies (e.g. facets)




                                A Presentation by
Query Builder Debugger




                         A Presentation by
Anatomy of a query




                     A Presentation by
Predicate resolution & execution
 Internally,
            a predicate evaluator is resolved
 Based on the type
 OSGi component (using factories)
 Handles:
     mapping to xpath (required)
     filtering of results
     custom ordering mechanism
     facet extraction
 Multiple   predicates of the same type(define an order)




                                       A Presentation by
Standard predicates
 path                           range
     supports multiple paths    daterange
     but beware: can be slow    similar
 property                           rep:similar
     JCR property               tagid& tag
     different operations       language
 type                               page languages
     node type                  event
 fulltext                           calendar
     full text search               example for shortening




                                   A Presentation by
Ordering
   Use (special) orderby predicate
       sort ascending by default, use orderby.desc=true for descending
   (1) Order by JCR properties
       orderby=@cq:tags
       orderby=@jcr:content/cq:tags
   (2) Reference predicate by name
       orderby=1_property
       predicate evaluator must provide ordering
       simply a list of properties (=> used in xpath query)
       or a custom Comparator (=> run after filtering)
   Multiple orderings
       1_orderby=@cq:tags
       2_orderby=@cq:lastModified
       3_orderby=nodename


                                              A Presentation by
Grouping of predicates




                         A Presentation by
Facets
  Extract set of possible values found in current result
  Options for a more specific query
  Facet = set of buckets
      Facet = tag
      Buckets = product, business, marketing
  Buckets    can also be custom ranges
      Facet = daterange
      Buckets = yesterday, last week, last year...




                                       A Presentation by
Sample Queries




                 A Presentation by
Sample Queries




                 A Presentation by
Sample Queries




                 A Presentation by
Sample Queries




                 A Presentation by
Javadoc Links

Javadoc                               Description
com.day.cq.search                     Basic QueryBuilder and Query API


com.day.cq.search.result              Result API
com.day.cq.search.facets              Facets
com.day.cq.search.facets.buckets      Buckets (contained within facets)


com.day.cq.search.eval                Predicate Evaluators
com.day.cq.search.facets.extractors   Facet Extractors (for evaluators)


com.day.cq.search.writer              JSON Result Hit Writer for Querybuilder
                                      servlet (/bin/querybuilder.json)




                                               A Presentation by
Query Builder Demo

  Create a getimages component
  Include that component on content
   page




                          A Presentation by
Query Builder Demo
  getimages.jsp   contains QueryBuilder API




                             A Presentation by
Query Builder Demo
 This
     component is used to get images from
  dam:Asset/jcr:content/image/jpeg tag




                          A Presentation by
References

 http://dev.day.com/docs/en/cq/current/da
  m/customizing_and_extendingcq5dam/quer
  y_builder.html
 http://dev.day.com/docs/en/cq/current/jav
  adoc/com/day/cq/search/QueryBuilder.html
 www.pro-
  vision.de/adaptto/downloads/2011_querybuil
  der.pdf
 http://dev.day.com/docs/en/cq/current/jav
  adoc/com/day/cq/search/Query.html



                          A Presentation by

More Related Content

What's hot

Jsp
JspJsp
CSS
CSS CSS
CSS
Sunil OS
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
WebStackAcademy
 
Modul Praktikum Pemrograman Berorientasi Objek (Chap.1-6)
Modul Praktikum Pemrograman Berorientasi Objek (Chap.1-6)Modul Praktikum Pemrograman Berorientasi Objek (Chap.1-6)
Modul Praktikum Pemrograman Berorientasi Objek (Chap.1-6)
Debby Ummul
 
AEM Rich Text Editor (RTE) Deep Dive
AEM Rich Text Editor (RTE) Deep DiveAEM Rich Text Editor (RTE) Deep Dive
AEM Rich Text Editor (RTE) Deep Dive
Hanish Bansal
 
Spring jdbc
Spring jdbcSpring jdbc
Spring jdbc
Harshit Choudhary
 
Responsive web-design through bootstrap
Responsive web-design through bootstrapResponsive web-design through bootstrap
Responsive web-design through bootstrap
Zunair Sagitarioux
 
Understanding CSS Selectors in Selenium.pdf
Understanding CSS Selectors in Selenium.pdfUnderstanding CSS Selectors in Selenium.pdf
Understanding CSS Selectors in Selenium.pdf
pCloudy
 
jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects  jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects
WebStackAcademy
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
Aaron Schram
 
Java Multi-threading programming
Java Multi-threading programmingJava Multi-threading programming
Java Multi-threading programming
DrRajeshreeKhande
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jiayun Zhou
 
AEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene IndexesAEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene Indexes
AdobeMarketingCloud
 
Eksperimen CSS - 02-1 grid layout
Eksperimen CSS - 02-1 grid layoutEksperimen CSS - 02-1 grid layout
Eksperimen CSS - 02-1 grid layout
KuliahKita
 
Spring Core
Spring CoreSpring Core
Spring Core
Pushan Bhattacharya
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
Funnelll
 
Pertemuan 8 google map
Pertemuan 8 google mapPertemuan 8 google map
Pertemuan 8 google map
heriakj
 
[PBO] Pertemuan 4 - Getter Setter
[PBO] Pertemuan 4 - Getter Setter[PBO] Pertemuan 4 - Getter Setter
[PBO] Pertemuan 4 - Getter Setter
rizki adam kurniawan
 
JavaFX Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
José Maria Silveira Neto
 

What's hot (20)

Jsp
JspJsp
Jsp
 
CSS
CSS CSS
CSS
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
Modul Praktikum Pemrograman Berorientasi Objek (Chap.1-6)
Modul Praktikum Pemrograman Berorientasi Objek (Chap.1-6)Modul Praktikum Pemrograman Berorientasi Objek (Chap.1-6)
Modul Praktikum Pemrograman Berorientasi Objek (Chap.1-6)
 
AEM Rich Text Editor (RTE) Deep Dive
AEM Rich Text Editor (RTE) Deep DiveAEM Rich Text Editor (RTE) Deep Dive
AEM Rich Text Editor (RTE) Deep Dive
 
JDBC – Java Database Connectivity
JDBC – Java Database ConnectivityJDBC – Java Database Connectivity
JDBC – Java Database Connectivity
 
Spring jdbc
Spring jdbcSpring jdbc
Spring jdbc
 
Responsive web-design through bootstrap
Responsive web-design through bootstrapResponsive web-design through bootstrap
Responsive web-design through bootstrap
 
Understanding CSS Selectors in Selenium.pdf
Understanding CSS Selectors in Selenium.pdfUnderstanding CSS Selectors in Selenium.pdf
Understanding CSS Selectors in Selenium.pdf
 
jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects  jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Java Multi-threading programming
Java Multi-threading programmingJava Multi-threading programming
Java Multi-threading programming
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
AEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene IndexesAEM GEMs Session Oak Lucene Indexes
AEM GEMs Session Oak Lucene Indexes
 
Eksperimen CSS - 02-1 grid layout
Eksperimen CSS - 02-1 grid layoutEksperimen CSS - 02-1 grid layout
Eksperimen CSS - 02-1 grid layout
 
Spring Core
Spring CoreSpring Core
Spring Core
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
 
Pertemuan 8 google map
Pertemuan 8 google mapPertemuan 8 google map
Pertemuan 8 google map
 
[PBO] Pertemuan 4 - Getter Setter
[PBO] Pertemuan 4 - Getter Setter[PBO] Pertemuan 4 - Getter Setter
[PBO] Pertemuan 4 - Getter Setter
 
JavaFX Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
 

Viewers also liked

CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011Alexander Klimetschek
 
Apache SOLR in AEM 6
Apache SOLR in AEM 6Apache SOLR in AEM 6
Apache SOLR in AEM 6
Yash Mody
 
Basics of Solr and Solr Integration with AEM6
Basics of Solr and Solr Integration with AEM6Basics of Solr and Solr Integration with AEM6
Basics of Solr and Solr Integration with AEM6DEEPAK KHETAWAT
 
Virus and antivirus
Virus and antivirusVirus and antivirus
Virus and antivirus
Harshal Joshi
 
Query Analyser , SQL Server Groups, Transact –SQL
Query Analyser , SQL Server Groups, Transact –SQLQuery Analyser , SQL Server Groups, Transact –SQL
Query Analyser , SQL Server Groups, Transact –SQLKomal Batra
 
SAP R3 SQL Query Builder
SAP R3 SQL Query BuilderSAP R3 SQL Query Builder
SAP R3 SQL Query Builder
Ambareesh Kulkarni
 
SentricWorkforce Query Builder
SentricWorkforce Query BuilderSentricWorkforce Query Builder
SentricWorkforce Query Builder
SentricTraining
 
Addmi 10-query builder
Addmi 10-query  builderAddmi 10-query  builder
Addmi 10-query builderodanyboy
 
Addmi 09.5-analysis ui-host-grouping
Addmi 09.5-analysis ui-host-groupingAddmi 09.5-analysis ui-host-grouping
Addmi 09.5-analysis ui-host-groupingodanyboy
 
Do you need an external search platform for Adobe Experience Manager?
Do you need an external search platform for Adobe Experience Manager?Do you need an external search platform for Adobe Experience Manager?
Do you need an external search platform for Adobe Experience Manager?
therealgaston
 
Omnisearch in AEM 6.2 - Search All the Things
Omnisearch in AEM 6.2 - Search All the ThingsOmnisearch in AEM 6.2 - Search All the Things
Omnisearch in AEM 6.2 - Search All the Things
Justin Edelson
 
Implementing Site Search in CQ5 / AEM
Implementing Site Search in CQ5 / AEMImplementing Site Search in CQ5 / AEM
Implementing Site Search in CQ5 / AEM
rtpaem
 
11aman
11aman11aman
11aman
Anu Jamwal
 
Graphical Password Authentication
Graphical Password AuthenticationGraphical Password Authentication
Graphical Password Authentication
Dhvani Shah
 
AEM (CQ) Dispatcher Caching Webinar 2013
AEM (CQ) Dispatcher Caching Webinar 2013AEM (CQ) Dispatcher Caching Webinar 2013
AEM (CQ) Dispatcher Caching Webinar 2013
Andrew Khoury
 
Graphical Password authentication using Hmac
Graphical Password authentication using HmacGraphical Password authentication using Hmac
Graphical Password authentication using Hmac
Arpana shree
 
Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling Models
Stefano Celentano
 
Image Based Password Authentication for Illiterate using Touch screen by Deep...
Image Based Password Authentication for Illiterate using Touch screen by Deep...Image Based Password Authentication for Illiterate using Touch screen by Deep...
Image Based Password Authentication for Illiterate using Touch screen by Deep...
Deepak Yadav
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
Ashokkumar T A
 

Viewers also liked (20)

CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
 
Apache SOLR in AEM 6
Apache SOLR in AEM 6Apache SOLR in AEM 6
Apache SOLR in AEM 6
 
Basics of Solr and Solr Integration with AEM6
Basics of Solr and Solr Integration with AEM6Basics of Solr and Solr Integration with AEM6
Basics of Solr and Solr Integration with AEM6
 
Virus and antivirus
Virus and antivirusVirus and antivirus
Virus and antivirus
 
Query Analyser , SQL Server Groups, Transact –SQL
Query Analyser , SQL Server Groups, Transact –SQLQuery Analyser , SQL Server Groups, Transact –SQL
Query Analyser , SQL Server Groups, Transact –SQL
 
SAP R3 SQL Query Builder
SAP R3 SQL Query BuilderSAP R3 SQL Query Builder
SAP R3 SQL Query Builder
 
SentricWorkforce Query Builder
SentricWorkforce Query BuilderSentricWorkforce Query Builder
SentricWorkforce Query Builder
 
Addmi 10-query builder
Addmi 10-query  builderAddmi 10-query  builder
Addmi 10-query builder
 
Addmi 09.5-analysis ui-host-grouping
Addmi 09.5-analysis ui-host-groupingAddmi 09.5-analysis ui-host-grouping
Addmi 09.5-analysis ui-host-grouping
 
Do you need an external search platform for Adobe Experience Manager?
Do you need an external search platform for Adobe Experience Manager?Do you need an external search platform for Adobe Experience Manager?
Do you need an external search platform for Adobe Experience Manager?
 
Omnisearch in AEM 6.2 - Search All the Things
Omnisearch in AEM 6.2 - Search All the ThingsOmnisearch in AEM 6.2 - Search All the Things
Omnisearch in AEM 6.2 - Search All the Things
 
Implementing Site Search in CQ5 / AEM
Implementing Site Search in CQ5 / AEMImplementing Site Search in CQ5 / AEM
Implementing Site Search in CQ5 / AEM
 
11aman
11aman11aman
11aman
 
Graphical Password Authentication
Graphical Password AuthenticationGraphical Password Authentication
Graphical Password Authentication
 
AEM (CQ) Dispatcher Caching Webinar 2013
AEM (CQ) Dispatcher Caching Webinar 2013AEM (CQ) Dispatcher Caching Webinar 2013
AEM (CQ) Dispatcher Caching Webinar 2013
 
Graphical Password authentication using Hmac
Graphical Password authentication using HmacGraphical Password authentication using Hmac
Graphical Password authentication using Hmac
 
Image based authentication
Image based authenticationImage based authentication
Image based authentication
 
Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling Models
 
Image Based Password Authentication for Illiterate using Touch screen by Deep...
Image Based Password Authentication for Illiterate using Touch screen by Deep...Image Based Password Authentication for Illiterate using Touch screen by Deep...
Image Based Password Authentication for Illiterate using Touch screen by Deep...
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
 

Similar to Quiery builder

Curriculum outline
Curriculum outlineCurriculum outline
Curriculum outline
Dipin Sharma
 
Java se 8 fundamentals
Java se 8 fundamentalsJava se 8 fundamentals
Java se 8 fundamentals
megharajk
 
Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Michał Orman
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
Azilen Technologies Pvt. Ltd.
 
ADF Gold Nuggets (Oracle Open World 2011)
ADF Gold Nuggets (Oracle Open World 2011)ADF Gold Nuggets (Oracle Open World 2011)
ADF Gold Nuggets (Oracle Open World 2011)
Lucas Jellema
 
Database Access With JDBC
Database Access With JDBCDatabase Access With JDBC
Database Access With JDBC
Dharani Kumar Madduri
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce Applications
Salesforce Developers
 
Java SE 8 & EE 7 Launch
Java SE 8 & EE 7 LaunchJava SE 8 & EE 7 Launch
Java SE 8 & EE 7 Launch
Digicomp Academy AG
 
Lift Framework
Lift FrameworkLift Framework
Lift Framework
Jeffrey Groneberg
 
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Julian Hyde
 
Spring db-access mod03
Spring db-access mod03Spring db-access mod03
Spring db-access mod03Guo Albert
 
3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_kIBM
 
Rad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh KRad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh KRoopa Nadkarni
 
Qtp syllabus
Qtp syllabus Qtp syllabus
Qtp syllabus
Rohit Chintu
 
Qtp training in hyderabad
Qtp training in hyderabadQtp training in hyderabad
Qtp training in hyderabad
G.C Reddy
 
Azure cosmosdb
Azure cosmosdbAzure cosmosdb
Azure cosmosdb
Udaiappa Ramachandran
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New EvolutionAllan Huang
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
Oracle
 
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Edureka!
 

Similar to Quiery builder (20)

Curriculum outline
Curriculum outlineCurriculum outline
Curriculum outline
 
Java se 8 fundamentals
Java se 8 fundamentalsJava se 8 fundamentals
Java se 8 fundamentals
 
Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
ADF Gold Nuggets (Oracle Open World 2011)
ADF Gold Nuggets (Oracle Open World 2011)ADF Gold Nuggets (Oracle Open World 2011)
ADF Gold Nuggets (Oracle Open World 2011)
 
Database Access With JDBC
Database Access With JDBCDatabase Access With JDBC
Database Access With JDBC
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce Applications
 
Java SE 8 & EE 7 Launch
Java SE 8 & EE 7 LaunchJava SE 8 & EE 7 Launch
Java SE 8 & EE 7 Launch
 
Lift Framework
Lift FrameworkLift Framework
Lift Framework
 
Java scriptforjavadev part2a
Java scriptforjavadev part2aJava scriptforjavadev part2a
Java scriptforjavadev part2a
 
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
 
Spring db-access mod03
Spring db-access mod03Spring db-access mod03
Spring db-access mod03
 
3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k
 
Rad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh KRad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh K
 
Qtp syllabus
Qtp syllabus Qtp syllabus
Qtp syllabus
 
Qtp training in hyderabad
Qtp training in hyderabadQtp training in hyderabad
Qtp training in hyderabad
 
Azure cosmosdb
Azure cosmosdbAzure cosmosdb
Azure cosmosdb
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
 

Recently uploaded

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Quiery builder

  • 2. Content :  What Is Query Builder?  Example usages  Why Query Builder?  Query Builder Debugger  Anatomy of a query  Predicate resolution & execution  Standard predicates  Ordering  Grouping of predicates  Facets  Sample Queries  Javadoc Links  Query Builder Demo  References A Presentation by
  • 3. What is QueryBuilder  QueryBuilder is a service for building Queries searching the Java Content Repository and which are easily extensible  A Query represents a JCR repository query that can be created programmatically, with a list of so-called Predicates  A Predicate is a single constraint for a Query. It is a pure data model object, consisting of a parameter map based on key-value string pairs.  This service allows to create queries with several convenience methods  In addition, it allows to store queries in the repository and load them again. A Presentation by
  • 4. Example usages A Presentation by
  • 5. Why Query Builder?  Because QueryBuilder is...  an API to build queries for a query engine (JCR XPath underneath)  especially via URL query parameters (GET & POSTs)  compatible with HTML forms  allowing to add/remove conditions (“predicates”) individually  allowing copy/paste of queries  easily extensible  providing some goodies (e.g. facets) A Presentation by
  • 6. Query Builder Debugger A Presentation by
  • 7. Anatomy of a query A Presentation by
  • 8. Predicate resolution & execution  Internally, a predicate evaluator is resolved  Based on the type  OSGi component (using factories)  Handles:  mapping to xpath (required)  filtering of results  custom ordering mechanism  facet extraction  Multiple predicates of the same type(define an order) A Presentation by
  • 9. Standard predicates  path  range  supports multiple paths  daterange  but beware: can be slow  similar  property  rep:similar  JCR property  tagid& tag  different operations  language  type  page languages  node type  event  fulltext  calendar  full text search  example for shortening A Presentation by
  • 10. Ordering  Use (special) orderby predicate  sort ascending by default, use orderby.desc=true for descending  (1) Order by JCR properties  orderby=@cq:tags  orderby=@jcr:content/cq:tags  (2) Reference predicate by name  orderby=1_property  predicate evaluator must provide ordering  simply a list of properties (=> used in xpath query)  or a custom Comparator (=> run after filtering)  Multiple orderings  1_orderby=@cq:tags  2_orderby=@cq:lastModified  3_orderby=nodename A Presentation by
  • 11. Grouping of predicates A Presentation by
  • 12. Facets  Extract set of possible values found in current result  Options for a more specific query  Facet = set of buckets  Facet = tag  Buckets = product, business, marketing  Buckets can also be custom ranges  Facet = daterange  Buckets = yesterday, last week, last year... A Presentation by
  • 13. Sample Queries A Presentation by
  • 14. Sample Queries A Presentation by
  • 15. Sample Queries A Presentation by
  • 16. Sample Queries A Presentation by
  • 17. Javadoc Links Javadoc Description com.day.cq.search Basic QueryBuilder and Query API com.day.cq.search.result Result API com.day.cq.search.facets Facets com.day.cq.search.facets.buckets Buckets (contained within facets) com.day.cq.search.eval Predicate Evaluators com.day.cq.search.facets.extractors Facet Extractors (for evaluators) com.day.cq.search.writer JSON Result Hit Writer for Querybuilder servlet (/bin/querybuilder.json) A Presentation by
  • 18. Query Builder Demo  Create a getimages component  Include that component on content page A Presentation by
  • 19. Query Builder Demo  getimages.jsp contains QueryBuilder API A Presentation by
  • 20. Query Builder Demo  This component is used to get images from dam:Asset/jcr:content/image/jpeg tag A Presentation by
  • 21. References  http://dev.day.com/docs/en/cq/current/da m/customizing_and_extendingcq5dam/quer y_builder.html  http://dev.day.com/docs/en/cq/current/jav adoc/com/day/cq/search/QueryBuilder.html  www.pro- vision.de/adaptto/downloads/2011_querybuil der.pdf  http://dev.day.com/docs/en/cq/current/jav adoc/com/day/cq/search/Query.html A Presentation by