AD0-E137 practice question 2 of 10
A customer added a custom property "foo:bar" to all assets. Once the property is added, the customer needs to run the following query: select * from [dam:Asset] where isdescendantnode('/content') and [foo:bar] ="Hello" How would the customer update the indexes to make sure the query is not a traversal query?
Full set: 50 questionsTo make a query on a custom property performant and avoid repository traversal, the property must be added to an Apache Oak index definition. The query specifically targets nodes of type dam:Asset. AEM provides a specialized, out-of-the-box Lucene index for assets located at /oak:index/damAssetLucene. The correct procedure is to overlay this index definition and add a new property node representing the custom property (foo:bar) under the path indexRules/dam:Asset/properties. This configuration instructs the damAssetLucene indexer to include the foo:bar property in the index, allowing the query engine to resolve the constraint efficiently.
B. Modifying the generic /oak:index/lucene index is not the best practice. The damAssetLucene index is specifically configured and optimized for dam:Asset nodes.
C. This is incorrect because the node added to the index definition must be named after the property (foo:bar), not its value (Hello).
1. Adobe Experience League, "Best Practices for Queries and Indexing": This document outlines the need to customize indexes for custom properties. It states, "The OOTB index damAssetLucene has most of the common properties... If you are querying for a property that is not in the OOTB list, add it to the list under .../damAssetLucene/indexRules/dam:Asset/properties." This directly supports adding the custom property to the damAssetLucene index structure as described in option A.
Source: Adobe Experience League Documentation, Best Practices for Queries and Indexing. Section: "Customizing the damAssetLucene Index".
2. Adobe Experience League, "Oak Queries and Indexing": This guide details the structure of Lucene index definitions in AEM. It shows that to index a property for a specific node type, a node representing the property must be created under /oak:index//indexRules//properties. This confirms the hierarchical path used in option A is the correct method for adding a property to an index rule.
Source: Adobe Experience League Documentation, Oak Queries and Indexing. Section: "Lucene Index".
3. Apache Oak Documentation, "Lucene Index": The official Oak documentation specifies the structure for Lucene property indexes. It details that the indexRules node contains child nodes for each indexed jcr:primaryType, which in turn contain a properties node where individual property configurations are defined. This foundational documentation validates the structure indexRules/dam:Asset/properties for defining an indexed property on a dam:Asset.
Source: Apache Jackrabbit Oak Documentation, Query -> Lucene Index. Section: "Index Definition Structure".
Keep practicing
Take the free AD0-E137 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AD0-E137 practice questions
- Question 1A developer is asked to create an Adobe Experience Manager servlet MyServlet that listens…
- Question 3A developer is adding a reference script to a third-party analytics tool. The script need…
- Question 5An Adobe Experience Manager team is using an additional DEV environment in Adobe Experien…
- Question 6From which source environment can content be copied to Stage using Content sets in Cloud …
- Question 7A developer is tasked with designing a solution to accommodate multiple client projects w…
- Question 9A customer has the requirement to use SAML authentication on AEM using their SAML 2.0 com…
