SlideShare a Scribd company logo
1 of 25
Download to read offline
.adaptTo(Berlin)



       CQ5 QueryBuilder
       Alexander Klimetschek | Senior Developer, Day | @alexkli




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   1
Agenda

                                                                          (1) What it looks like & Use Cases
                                                                          (2) Philosophy & Consequences
                                                                          (3) Debugging
                                                                          (4) Queries & Samples
                                                                          (5) Running Queries
                                                                          (6) Facets
                                                                          (7) Extending




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.               2
QueryBuilder - What it looks like

§   Search for jar files, and order them newest first:
                                                       type=nt:file
                                                       nodename=*.jar
                                                       orderby=@jcr:content/jcr:lastModified
                                                       orderby.sort=desc

§   As URL:
                http://localhost:4502/bin/querybuilder.json?
                type=nt:file&nodename=*.jar&
                orderby=@jcr:content/jcr:lastModified&orderby.sort=desc


§   Result as JSON:                                     {
                                                             success: true,
                                                             results: 10,
                                                             total: 155,
                                                             offset: 0,
                                                             hits: [{
                                                               path: "/apps/cloudmgr/install/cq-change-admin-pwd-1.0.1-SNAPSHOT.jar"
                                                               excerpt: "application/java-archive"
                                                               name: "cq-change-admin-pwd-1.0.1-SNAPSHOT.jar"
                                                               ....
                                                             },{...}
                                                             ]
                                                         }



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.                   3                                        QueryBuilder - AdaptTo(Berlin) 2011
Use Cases!?

§   Advanced query forms
     §   DAM Asset share
     §   form-based elements
     §   „querybuilder UI components“
     §   author can add/remove them
          individually
     §   normal form POST or via AJAX




     §   Content Finder would be cool....




§   Search component in CQ (for facets)
§   Quick AJAX json query from the client side

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   4   QueryBuilder - AdaptTo(Berlin) 2011
Philosophy

§   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)




§   QueryBuilder is not...
     §   a query engine itself
     §   does not have its own search index
     §   or even cache


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   5   QueryBuilder - AdaptTo(Berlin) 2011
Consequences: URL parameters

§   Set of key = value pairs
                                                                                                                                        d   er
          Java: hash maps, property files                                                                                       ry buil
     §                                                                                                            ue
                                                                                                            b in/q
                                                                                                     :4 502/ .jar& odified
                                                                                              al host name=* :lastM
                                                                                      :/  /loc e&node nt/jcr
§   Keep it short for GET requests                                               http nt:fil :conte
                                                                                       =
                                                                                  type by=@jcr
                                                                                        r
     §   as fallback, use POST to transport „long“ queries                        orde
     §   but short queries are more readable
     => Avoid duplication in parameter names
     => Allow to write custom „shortcut“ predicates (extensible)

§   Order must be encoded in parameter names
     §   HTML form GETs/POSTs are required to be in order
     §   but the Java servlet spec gives you a hash map....
     => Conflicts with short names above
     => Solution is not very intuitive the first time, but it works

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   6                       QueryBuilder - AdaptTo(Berlin) 2011
More Consequences

§   HTML checkbox behaviour
     §   checked: field=on
     §   not checked: <not sent with the request>
§   Predicates are separate entities
     §   though grouping exists
§   Copy/paste
     §   obvious one, but XPath for JCR does not respect it (limit & offset)
     §   nothing that can only be done through an API call
     §   global settings, given as p.offset=10
§   Extensible
     §   predicates evaluators as OSGi components
     §   SCR registration to associate with predicate name




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   7   QueryBuilder - AdaptTo(Berlin) 2011
QueryBuilder Debugger

§   http://localhost:4502/libs/cq/search/content/querydebug.html




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   8   QueryBuilder - AdaptTo(Berlin) 2011
Debug logs

§   For all query builder executed queries

§   Set „com.day.cq.search“ to INFO or DEBUG or TRACE level

§   Standard INFO level (shortened):
     15.09.2011 19:17:48.566 *INFO* ...QueryImpl                              executing query (URL):
     nodename=*.jar&type=nt%3afile
     15.09.2011 19:17:48.566 *INFO* ...QueryImpl                              executing query (predicate tree):
     ROOT=group: [
         {nodename=nodename: nodename=*.jar}
         {type=type: type=nt:file}
     ]
     15.09.2011 19:17:48.567 *INFO* ...QueryImpl                              xpath query: //element(*, nt:file)
     15.09.2011 19:17:48.569 *INFO* ...QueryImpl                              xpath query took 3 ms
     15.09.2011 19:17:48.569 *INFO* ...QueryImpl                              filtering predicates: {nodename=nodename: nodename=*.jar}
     15.09.2011 19:17:48.752 *INFO* ...QueryImpl                              >> xpath query returned 5098 results (counted)
     15.09.2011 19:17:48.753 *INFO* ...QueryImpl                              filtering took 184 ms
     15.09.2011 19:17:48.753 *INFO* ...QueryImpl                              >> after filtering there are 155 results
     15.09.2011 19:17:48.753 *INFO* ...QueryImpl                              entire query execution took 187 ms




§   For production, set it to WARN or ERROR ;-)


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.           9                                  QueryBuilder - AdaptTo(Berlin) 2011
Anatomy of a query


                                                         Predicate name and type and parameter
              Predicates


                                                 type=cq:Page
                                                 property=jcr:content/cq:template
                                       {         property.value=/apps/geometrixx/templates/homepage



                                                                              Parameter        Value

                 Predicate‘s type is mirrored as parameter internally:

                                        type.type=cq:Page
                                        property.property=jcr:content/cq:template
                                        property.value=/apps/geometrixx/templates/homepage



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.               10           QueryBuilder - AdaptTo(Berlin) 2011
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




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   11   QueryBuilder - AdaptTo(Berlin) 2011
Multiple predicates of the same type

§   Fixed numbering scheme
§   Name = <nr>_<type>
§   Allows to define an order
     §   work around hash maps


                              type=cq:Page
                              1_property=jcr:content/cq:template
                              1_property.value=/apps/geometrixx/templates/homepage
                              2_property=jcr:content/jcr:title
                              2_property.value=English




§   No custom names possible!



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   12   QueryBuilder - AdaptTo(Berlin) 2011
Standard predicates

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


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   13                                QueryBuilder - AdaptTo(Berlin) 2011
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


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   14   QueryBuilder - AdaptTo(Berlin) 2011
Grouping of predicates

§   Special group predicate
                                             fulltext=Management
                                             group.p.or=true
                                             group.1_path=/content/geometrixx/en
                                             group.2_path=/content/dam/geometrixx


§   Like brackets:
     §   (fulltext AND (path=... OR path=...))

§   Nested:
                                             fulltext=Management
                                             group.p.or=true
                                             group.1_group.path=/content/geometrixx/en
                                             group.1_group.type=cq:Page                      a re ! w !
                                                                                        Be w e s l o
                                             group.2_group.path=/content/dam/geometrixx C a n b
                                             group.2_group.type=dam:Asset

     §   (ft AND ( (path= AND type=) OR (path= AND type=) ))

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   15            QueryBuilder - AdaptTo(Berlin) 2011
Running queries

§   Default servlets
     §   JSON: http://localhost:4502/bin/querybuilder.json
     §   Atom feed: http://localhost:4502/bin/querybuilder.feed
     §   iCalendar: http://localhost:4502/bin/querybuilder.ics


§   Java API
                  PredicateGroup root = PredicateGroup.create(request.getParameterMap());
                  Query query = queryBuilder.createQuery(root, session);

                  SearchResult result = query.getResult();
                  for (Hit hit : result.getHits()) {
                      String path = hit.getPath();
                      // ....
                  }




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   16   QueryBuilder - AdaptTo(Berlin) 2011
JSON servlet

§   JSON: http://localhost:4502/bin/querybuilder.json


§   p.hits selects how the hits are written
     §   simple
          §   path, lastmodified, etc. only
     §   full
          §   full sling json rendering of node
          §   by default entire subtree
          §   p.nodedepth=1 as in sling‘s json (0 = infinity)
     §   selective
          §   p.properties is an array of properties to write
          §   just the node itself




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   17   QueryBuilder - AdaptTo(Berlin) 2011
Java API

§   From HTTP request:
                Session session = request.getResourceResolver().adaptTo(Session.class);
                PredicateGroup root = PredicateGroup.create(request.getParameterMap());
                Query query = queryBuilder.createQuery(root, session);

§   From hash map:
                Map map = new HashMap();
                map.put("path", "/content");
                map.put("type", "nt:file");
                Query query = builder.createQuery(PredicateGroup.create(map), session);


§   From predicates:
                PredicateGroup group = new PredicateGroup();
                group.add(new Predicate("mypath", "path").set("path", "/content"));
                group.add(new Predicate("mytype", "type").set("type", "nt:file"));
                Query query = builder.createQuery(group, session);



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   18   QueryBuilder - AdaptTo(Berlin) 2011
Persisted Queries

§   Store query
     §   in Java properties file format
     §   in the repository
     §   as file node
     §   or as string property

                  Query query = .... // create query normally

                  // store query as file
                  queryBuilder.storeQuery(query, „/content/myquery“, true, session);


                  // load it again
                  Query query = queryBuilder.loadQuery(„/content/myquery“, session);



§   List component allows this



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   19   QueryBuilder - AdaptTo(Berlin) 2011
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...


                                           Map<String, Facet> facets = result.getFacets();
                                           for (String key : facets.keySet()) {
                                               Facet facet = facets.get(key);
                                               if (facet.getContainsHit()) {
                                                   writer.key(key).array();
                                                   for (Bucket bucket : facet.getBuckets()) {
                                                   }
                                               }
                                           }

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   20                QueryBuilder - AdaptTo(Berlin) 2011
Run new query based on facet/bucket

§   Simple as that:


                        String bucketURL =

                        query.refine(bucket).getPredicates().toURL();


§   Facets are extracted for all predictes in the current query
     §   keep them „empty“ if they should not search


                            type=cq:Page
                            1_property=jcr:content/cq:template
                            1_property.value=/apps/geometrixx/templates/homepage
                            2_property=jcr:content/jcr:title



                                                                   No value for 2_property

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.            21    QueryBuilder - AdaptTo(Berlin) 2011
Extending: Writing custom predicate evaluators

/** @scr.component metatype="no"
 *                factory="com.day.cq.search.eval.PredicateEvaluator/event" */
public class EventPredicateEvaluator extends AbstractPredicateEvaluator {
    public String getXPathExpression(Predicate p, EvaluationContext context) {
        final String from = p.get(„from“);
        final String to = p.get(„to“);

                     // build xpath snippet
                     return „@start = ,...‘ and @end = ,...‘“;
         }

         public String[] getOrderByProperties(Predicate predicate, EvaluationContext ctx) {
             return new String[] { „start“ };
         }

         public boolean canFilter(Predicate predicate, EvaluationContext context) {
             return false;
         }

         public boolean canXpath(Predicate predicate, EvaluationContext context) {
             return true;
         }
}

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   22   QueryBuilder - AdaptTo(Berlin) 2011
Filtering & Facet extraction

§   In addition or alternatively to xpath, a predicate can filter
§   goes over nodes in result and says include or drop

          public boolean includes(Predicate p, Row row, EvaluationContext context)




§   Facet extraction is „lazy“
§   Evaluator returns a FacetExtractor
§   Base implementations available
     §   PropertyFacetExtractor
          §   DistinctValuesFacetExtractor
          §   PredefinedBucketsFacetExtractor




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   23   QueryBuilder - AdaptTo(Berlin) 2011
Documentation

§   Basic docs plus some examples:
     §   http://wem.help.adobe.com/enterprise/en_US/10-0/wem/dam/
          customizing_and_extendingcq5dam/query_builder.html
§   Javadocs
     §   http://wem.help.adobe.com/enterprise/en_US/10-0/wem/javadoc/com/day/cq/search/
          package-summary.html




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   24   QueryBuilder - AdaptTo(Berlin) 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

More Related Content

What's hot

AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負Akio Katayama
 
Rescale で Singularity を使ってみよう!
Rescale で Singularity を使ってみよう!Rescale で Singularity を使ってみよう!
Rescale で Singularity を使ってみよう!Shinnosuke Furuya
 
Optimización de costos en migraciones a la nube AWS
Optimización de costos en migraciones a la nube AWSOptimización de costos en migraciones a la nube AWS
Optimización de costos en migraciones a la nube AWSAmazon Web Services LATAM
 
Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsStefano Celentano
 
[OpenInfra Days Korea 2018] (Track 1) TACO (SKT All Container OpenStack): Clo...
[OpenInfra Days Korea 2018] (Track 1) TACO (SKT All Container OpenStack): Clo...[OpenInfra Days Korea 2018] (Track 1) TACO (SKT All Container OpenStack): Clo...
[OpenInfra Days Korea 2018] (Track 1) TACO (SKT All Container OpenStack): Clo...OpenStack Korea Community
 
traitを使って楽したい話
traitを使って楽したい話traitを使って楽したい話
traitを使って楽したい話infinite_loop
 
Amazon Route53へのドメイン移管
Amazon Route53へのドメイン移管Amazon Route53へのドメイン移管
Amazon Route53へのドメイン移管Jin k
 
20201207 AWS Black Belt Online Seminar AWS re:Invent 2020 速報 Part1
20201207 AWS Black Belt Online Seminar AWS re:Invent 2020 速報 Part120201207 AWS Black Belt Online Seminar AWS re:Invent 2020 速報 Part1
20201207 AWS Black Belt Online Seminar AWS re:Invent 2020 速報 Part1Amazon Web Services Japan
 
Amazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora Deep Dive (김기완) - AWS DB DayAmazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora Deep Dive (김기완) - AWS DB DayAmazon Web Services Korea
 
ユニットテストの保守性を作りこむ, xpjugkansai2011
ユニットテストの保守性を作りこむ, xpjugkansai2011ユニットテストの保守性を作りこむ, xpjugkansai2011
ユニットテストの保守性を作りこむ, xpjugkansai2011H Iseri
 
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2)
 [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2)
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2)Amazon Web Services Japan
 
AWS Black Belt Online Seminar 2016 AWS上でのファイルサーバ構築
AWS Black Belt Online Seminar 2016 AWS上でのファイルサーバ構築AWS Black Belt Online Seminar 2016 AWS上でのファイルサーバ構築
AWS Black Belt Online Seminar 2016 AWS上でのファイルサーバ構築Amazon Web Services Japan
 
DynamoDB設計のちょっとした技
DynamoDB設計のちょっとした技DynamoDB設計のちょっとした技
DynamoDB設計のちょっとした技Yoichi Toyota
 
Cognitoハンズオン
CognitoハンズオンCognitoハンズオン
CognitoハンズオンShinji Miyazato
 
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017Amazon Web Services Korea
 
半日でわかる コンテナー技術 (応用編)
半日でわかる コンテナー技術 (応用編)半日でわかる コンテナー技術 (応用編)
半日でわかる コンテナー技術 (応用編)Toru Makabe
 

What's hot (20)

AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負AWS上で使えるストレージ十番勝負
AWS上で使えるストレージ十番勝負
 
Rescale で Singularity を使ってみよう!
Rescale で Singularity を使ってみよう!Rescale で Singularity を使ってみよう!
Rescale で Singularity を使ってみよう!
 
Optimización de costos en migraciones a la nube AWS
Optimización de costos en migraciones a la nube AWSOptimización de costos en migraciones a la nube AWS
Optimización de costos en migraciones a la nube AWS
 
Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling Models
 
[OpenInfra Days Korea 2018] (Track 1) TACO (SKT All Container OpenStack): Clo...
[OpenInfra Days Korea 2018] (Track 1) TACO (SKT All Container OpenStack): Clo...[OpenInfra Days Korea 2018] (Track 1) TACO (SKT All Container OpenStack): Clo...
[OpenInfra Days Korea 2018] (Track 1) TACO (SKT All Container OpenStack): Clo...
 
traitを使って楽したい話
traitを使って楽したい話traitを使って楽したい話
traitを使って楽したい話
 
Amazon Route53へのドメイン移管
Amazon Route53へのドメイン移管Amazon Route53へのドメイン移管
Amazon Route53へのドメイン移管
 
20201207 AWS Black Belt Online Seminar AWS re:Invent 2020 速報 Part1
20201207 AWS Black Belt Online Seminar AWS re:Invent 2020 速報 Part120201207 AWS Black Belt Online Seminar AWS re:Invent 2020 速報 Part1
20201207 AWS Black Belt Online Seminar AWS re:Invent 2020 速報 Part1
 
AWS Black Belt Techシリーズ Amazon EBS
AWS Black Belt Techシリーズ  Amazon EBSAWS Black Belt Techシリーズ  Amazon EBS
AWS Black Belt Techシリーズ Amazon EBS
 
Amazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora Deep Dive (김기완) - AWS DB DayAmazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora Deep Dive (김기완) - AWS DB Day
 
ユニットテストの保守性を作りこむ, xpjugkansai2011
ユニットテストの保守性を作りこむ, xpjugkansai2011ユニットテストの保守性を作りこむ, xpjugkansai2011
ユニットテストの保守性を作りこむ, xpjugkansai2011
 
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2)
 [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2)
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2)
 
AWS Black Belt Online Seminar 2016 AWS上でのファイルサーバ構築
AWS Black Belt Online Seminar 2016 AWS上でのファイルサーバ構築AWS Black Belt Online Seminar 2016 AWS上でのファイルサーバ構築
AWS Black Belt Online Seminar 2016 AWS上でのファイルサーバ構築
 
DynamoDB設計のちょっとした技
DynamoDB設計のちょっとした技DynamoDB設計のちょっとした技
DynamoDB設計のちょっとした技
 
Deep Dive on Amazon Aurora
Deep Dive on Amazon AuroraDeep Dive on Amazon Aurora
Deep Dive on Amazon Aurora
 
Cognitoハンズオン
CognitoハンズオンCognitoハンズオン
Cognitoハンズオン
 
ここから始めるAWSセキュリティ
ここから始めるAWSセキュリティここから始めるAWSセキュリティ
ここから始めるAWSセキュリティ
 
Javaメモリ勉強会
Javaメモリ勉強会Javaメモリ勉強会
Javaメモリ勉強会
 
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
 
半日でわかる コンテナー技術 (応用編)
半日でわかる コンテナー技術 (応用編)半日でわかる コンテナー技術 (応用編)
半日でわかる コンテナー技術 (応用編)
 

Viewers also liked

Apache SOLR in AEM 6
Apache SOLR in AEM 6Apache SOLR in AEM 6
Apache SOLR in AEM 6Yash 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
 
Implementing Site Search in CQ5 / AEM
Implementing Site Search in CQ5 / AEMImplementing Site Search in CQ5 / AEM
Implementing Site Search in CQ5 / AEMrtpaem
 
AEM (CQ) Dispatcher Caching Webinar 2013
AEM (CQ) Dispatcher Caching Webinar 2013AEM (CQ) Dispatcher Caching Webinar 2013
AEM (CQ) Dispatcher Caching Webinar 2013Andrew Khoury
 
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
 
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 ThingsJustin Edelson
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAshokkumar T A
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAndrew Khoury
 
AEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentAEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentGabriel Walt
 
Kanban boards step by step
Kanban boards step by stepKanban boards step by step
Kanban boards step by stepGiulio Roggero
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computingRkrishna Mishra
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksSlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShareSlideShare
 

Viewers also liked (20)

Quiery builder
Quiery builderQuiery builder
Quiery builder
 
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
 
Implementing Site Search in CQ5 / AEM
Implementing Site Search in CQ5 / AEMImplementing Site Search in CQ5 / AEM
Implementing Site Search in CQ5 / AEM
 
Virus and antivirus
Virus and antivirusVirus and antivirus
Virus and antivirus
 
AEM (CQ) Dispatcher Caching Webinar 2013
AEM (CQ) Dispatcher Caching Webinar 2013AEM (CQ) Dispatcher Caching Webinar 2013
AEM (CQ) Dispatcher Caching Webinar 2013
 
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
 
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
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser Caching
 
AEM Best Practices for Component Development
AEM Best Practices for Component DevelopmentAEM Best Practices for Component Development
AEM Best Practices for Component Development
 
Dell cod.scr--
Dell cod.scr--Dell cod.scr--
Dell cod.scr--
 
Kanban boards step by step
Kanban boards step by stepKanban boards step by step
Kanban boards step by step
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computing
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
 

Similar to CQ5 QueryBuilder - .adaptTo(Berlin) 2011

GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration BackendArun Gupta
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012Arun Gupta
 
Writing Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason LeeWriting Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason Leejaxconf
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...Ivanti
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesAlfresco Software
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Arun Gupta
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best PracticesEric Bottard
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Arun Gupta
 
SXSW 2012 JavaScript MythBusters
SXSW 2012 JavaScript MythBustersSXSW 2012 JavaScript MythBusters
SXSW 2012 JavaScript MythBustersElena-Oana Tabaranu
 
Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Tino Isnich
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
HTTP Caching and PHP
HTTP Caching and PHPHTTP Caching and PHP
HTTP Caching and PHPDavid de Boer
 
Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Tomek Kaczanowski
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsSadayuki Furuhashi
 
Google AppEngine (GAE/J) - Introduction and Overview from a Java Guy
Google AppEngine (GAE/J) - Introduction and Overview from a Java GuyGoogle AppEngine (GAE/J) - Introduction and Overview from a Java Guy
Google AppEngine (GAE/J) - Introduction and Overview from a Java GuyMax Völkel
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocratJonathan Linowes
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsIván López Martín
 

Similar to CQ5 QueryBuilder - .adaptTo(Berlin) 2011 (20)

GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
Writing Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason LeeWriting Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason Lee
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 
Play framework
Play frameworkPlay framework
Play framework
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
 
SXSW 2012 JavaScript MythBusters
SXSW 2012 JavaScript MythBustersSXSW 2012 JavaScript MythBusters
SXSW 2012 JavaScript MythBusters
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
HTTP Caching and PHP
HTTP Caching and PHPHTTP Caching and PHP
HTTP Caching and PHP
 
Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
 
Google AppEngine (GAE/J) - Introduction and Overview from a Java Guy
Google AppEngine (GAE/J) - Introduction and Overview from a Java GuyGoogle AppEngine (GAE/J) - Introduction and Overview from a Java Guy
Google AppEngine (GAE/J) - Introduction and Overview from a Java Guy
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat
 
Greach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut ConfigurationsGreach 2019 - Creating Micronaut Configurations
Greach 2019 - Creating Micronaut Configurations
 

Recently uploaded

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
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
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
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...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

CQ5 QueryBuilder - .adaptTo(Berlin) 2011

  • 1. .adaptTo(Berlin) CQ5 QueryBuilder Alexander Klimetschek | Senior Developer, Day | @alexkli © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 1
  • 2. Agenda (1) What it looks like & Use Cases (2) Philosophy & Consequences (3) Debugging (4) Queries & Samples (5) Running Queries (6) Facets (7) Extending © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 2
  • 3. QueryBuilder - What it looks like § Search for jar files, and order them newest first: type=nt:file nodename=*.jar orderby=@jcr:content/jcr:lastModified orderby.sort=desc § As URL: http://localhost:4502/bin/querybuilder.json? type=nt:file&nodename=*.jar& orderby=@jcr:content/jcr:lastModified&orderby.sort=desc § Result as JSON: { success: true, results: 10, total: 155, offset: 0, hits: [{ path: "/apps/cloudmgr/install/cq-change-admin-pwd-1.0.1-SNAPSHOT.jar" excerpt: "application/java-archive" name: "cq-change-admin-pwd-1.0.1-SNAPSHOT.jar" .... },{...} ] } © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 3 QueryBuilder - AdaptTo(Berlin) 2011
  • 4. Use Cases!? § Advanced query forms § DAM Asset share § form-based elements § „querybuilder UI components“ § author can add/remove them individually § normal form POST or via AJAX § Content Finder would be cool.... § Search component in CQ (for facets) § Quick AJAX json query from the client side © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4 QueryBuilder - AdaptTo(Berlin) 2011
  • 5. Philosophy § 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) § QueryBuilder is not... § a query engine itself § does not have its own search index § or even cache © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 5 QueryBuilder - AdaptTo(Berlin) 2011
  • 6. Consequences: URL parameters § Set of key = value pairs d er Java: hash maps, property files ry buil § ue b in/q :4 502/ .jar& odified al host name=* :lastM :/ /loc e&node nt/jcr § Keep it short for GET requests http nt:fil :conte = type by=@jcr r § as fallback, use POST to transport „long“ queries orde § but short queries are more readable => Avoid duplication in parameter names => Allow to write custom „shortcut“ predicates (extensible) § Order must be encoded in parameter names § HTML form GETs/POSTs are required to be in order § but the Java servlet spec gives you a hash map.... => Conflicts with short names above => Solution is not very intuitive the first time, but it works © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 6 QueryBuilder - AdaptTo(Berlin) 2011
  • 7. More Consequences § HTML checkbox behaviour § checked: field=on § not checked: <not sent with the request> § Predicates are separate entities § though grouping exists § Copy/paste § obvious one, but XPath for JCR does not respect it (limit & offset) § nothing that can only be done through an API call § global settings, given as p.offset=10 § Extensible § predicates evaluators as OSGi components § SCR registration to associate with predicate name © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7 QueryBuilder - AdaptTo(Berlin) 2011
  • 8. QueryBuilder Debugger § http://localhost:4502/libs/cq/search/content/querydebug.html © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8 QueryBuilder - AdaptTo(Berlin) 2011
  • 9. Debug logs § For all query builder executed queries § Set „com.day.cq.search“ to INFO or DEBUG or TRACE level § Standard INFO level (shortened): 15.09.2011 19:17:48.566 *INFO* ...QueryImpl executing query (URL): nodename=*.jar&type=nt%3afile 15.09.2011 19:17:48.566 *INFO* ...QueryImpl executing query (predicate tree): ROOT=group: [ {nodename=nodename: nodename=*.jar} {type=type: type=nt:file} ] 15.09.2011 19:17:48.567 *INFO* ...QueryImpl xpath query: //element(*, nt:file) 15.09.2011 19:17:48.569 *INFO* ...QueryImpl xpath query took 3 ms 15.09.2011 19:17:48.569 *INFO* ...QueryImpl filtering predicates: {nodename=nodename: nodename=*.jar} 15.09.2011 19:17:48.752 *INFO* ...QueryImpl >> xpath query returned 5098 results (counted) 15.09.2011 19:17:48.753 *INFO* ...QueryImpl filtering took 184 ms 15.09.2011 19:17:48.753 *INFO* ...QueryImpl >> after filtering there are 155 results 15.09.2011 19:17:48.753 *INFO* ...QueryImpl entire query execution took 187 ms § For production, set it to WARN or ERROR ;-) © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 9 QueryBuilder - AdaptTo(Berlin) 2011
  • 10. Anatomy of a query Predicate name and type and parameter Predicates type=cq:Page property=jcr:content/cq:template { property.value=/apps/geometrixx/templates/homepage Parameter Value Predicate‘s type is mirrored as parameter internally: type.type=cq:Page property.property=jcr:content/cq:template property.value=/apps/geometrixx/templates/homepage © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 10 QueryBuilder - AdaptTo(Berlin) 2011
  • 11. 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 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 11 QueryBuilder - AdaptTo(Berlin) 2011
  • 12. Multiple predicates of the same type § Fixed numbering scheme § Name = <nr>_<type> § Allows to define an order § work around hash maps type=cq:Page 1_property=jcr:content/cq:template 1_property.value=/apps/geometrixx/templates/homepage 2_property=jcr:content/jcr:title 2_property.value=English § No custom names possible! © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 12 QueryBuilder - AdaptTo(Berlin) 2011
  • 13. Standard predicates § path § tagid & tag § supports multiple paths § language § but beware: can be slow § page languages § property § event § JCR property § calendar § different operations § example for shortening § type § node type § fulltext § full text search § range § daterange § similar § rep:similar © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13 QueryBuilder - AdaptTo(Berlin) 2011
  • 14. 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 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 14 QueryBuilder - AdaptTo(Berlin) 2011
  • 15. Grouping of predicates § Special group predicate fulltext=Management group.p.or=true group.1_path=/content/geometrixx/en group.2_path=/content/dam/geometrixx § Like brackets: § (fulltext AND (path=... OR path=...)) § Nested: fulltext=Management group.p.or=true group.1_group.path=/content/geometrixx/en group.1_group.type=cq:Page a re ! w ! Be w e s l o group.2_group.path=/content/dam/geometrixx C a n b group.2_group.type=dam:Asset § (ft AND ( (path= AND type=) OR (path= AND type=) )) © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 15 QueryBuilder - AdaptTo(Berlin) 2011
  • 16. Running queries § Default servlets § JSON: http://localhost:4502/bin/querybuilder.json § Atom feed: http://localhost:4502/bin/querybuilder.feed § iCalendar: http://localhost:4502/bin/querybuilder.ics § Java API PredicateGroup root = PredicateGroup.create(request.getParameterMap()); Query query = queryBuilder.createQuery(root, session); SearchResult result = query.getResult(); for (Hit hit : result.getHits()) { String path = hit.getPath(); // .... } © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 16 QueryBuilder - AdaptTo(Berlin) 2011
  • 17. JSON servlet § JSON: http://localhost:4502/bin/querybuilder.json § p.hits selects how the hits are written § simple § path, lastmodified, etc. only § full § full sling json rendering of node § by default entire subtree § p.nodedepth=1 as in sling‘s json (0 = infinity) § selective § p.properties is an array of properties to write § just the node itself © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 17 QueryBuilder - AdaptTo(Berlin) 2011
  • 18. Java API § From HTTP request: Session session = request.getResourceResolver().adaptTo(Session.class); PredicateGroup root = PredicateGroup.create(request.getParameterMap()); Query query = queryBuilder.createQuery(root, session); § From hash map: Map map = new HashMap(); map.put("path", "/content"); map.put("type", "nt:file"); Query query = builder.createQuery(PredicateGroup.create(map), session); § From predicates: PredicateGroup group = new PredicateGroup(); group.add(new Predicate("mypath", "path").set("path", "/content")); group.add(new Predicate("mytype", "type").set("type", "nt:file")); Query query = builder.createQuery(group, session); © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 18 QueryBuilder - AdaptTo(Berlin) 2011
  • 19. Persisted Queries § Store query § in Java properties file format § in the repository § as file node § or as string property Query query = .... // create query normally // store query as file queryBuilder.storeQuery(query, „/content/myquery“, true, session); // load it again Query query = queryBuilder.loadQuery(„/content/myquery“, session); § List component allows this © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 19 QueryBuilder - AdaptTo(Berlin) 2011
  • 20. 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... Map<String, Facet> facets = result.getFacets(); for (String key : facets.keySet()) { Facet facet = facets.get(key); if (facet.getContainsHit()) { writer.key(key).array(); for (Bucket bucket : facet.getBuckets()) { } } } © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 20 QueryBuilder - AdaptTo(Berlin) 2011
  • 21. Run new query based on facet/bucket § Simple as that: String bucketURL = query.refine(bucket).getPredicates().toURL(); § Facets are extracted for all predictes in the current query § keep them „empty“ if they should not search type=cq:Page 1_property=jcr:content/cq:template 1_property.value=/apps/geometrixx/templates/homepage 2_property=jcr:content/jcr:title No value for 2_property © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 21 QueryBuilder - AdaptTo(Berlin) 2011
  • 22. Extending: Writing custom predicate evaluators /** @scr.component metatype="no" * factory="com.day.cq.search.eval.PredicateEvaluator/event" */ public class EventPredicateEvaluator extends AbstractPredicateEvaluator { public String getXPathExpression(Predicate p, EvaluationContext context) { final String from = p.get(„from“); final String to = p.get(„to“); // build xpath snippet return „@start = ,...‘ and @end = ,...‘“; } public String[] getOrderByProperties(Predicate predicate, EvaluationContext ctx) { return new String[] { „start“ }; } public boolean canFilter(Predicate predicate, EvaluationContext context) { return false; } public boolean canXpath(Predicate predicate, EvaluationContext context) { return true; } } © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 22 QueryBuilder - AdaptTo(Berlin) 2011
  • 23. Filtering & Facet extraction § In addition or alternatively to xpath, a predicate can filter § goes over nodes in result and says include or drop public boolean includes(Predicate p, Row row, EvaluationContext context) § Facet extraction is „lazy“ § Evaluator returns a FacetExtractor § Base implementations available § PropertyFacetExtractor § DistinctValuesFacetExtractor § PredefinedBucketsFacetExtractor © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 23 QueryBuilder - AdaptTo(Berlin) 2011
  • 24. Documentation § Basic docs plus some examples: § http://wem.help.adobe.com/enterprise/en_US/10-0/wem/dam/ customizing_and_extendingcq5dam/query_builder.html § Javadocs § http://wem.help.adobe.com/enterprise/en_US/10-0/wem/javadoc/com/day/cq/search/ package-summary.html © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 24 QueryBuilder - AdaptTo(Berlin) 2011
  • 25. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n