Need for Query and Index in AEM
For functionalities like full text search, retrieve content based on certain property or conditions associated with property/to avoid iterations on huge volume of content under the root, we write query based logic in AEM. Languages supported : XPATH JCR-SQL2 XPath: Created using AEM Query Builder API. - com.day.cq.search.* From development point of view, we need to be aware of standard OOB predicates to arrive at XPATH query. JCR-SQL2: JCR-SQL2 queries are created using QueryManager - javax.jcr.query.QueryManager QueryManager is acquired through JCR Session - session.getWorkspace().getQueryManager() Query Processing: Before AEM 6.0/Jackrabbit 2, everything in AEM is indexed by default. With Jackrabbit Oak, we can create custom indexes based on the need. OOB indexes are available under /oak:index node in the repository. Oak Query Engine Process queries in the form of JCR-SQL2. This means if we write queries using QueryBuilder API involvi...