<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kiran Mayee N on Medium]]></title>
        <description><![CDATA[Stories by Kiran Mayee N on Medium]]></description>
        <link>https://medium.com/@kiran.mayee?source=rss-860a4122753f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Vv-7xzFg7A6mWOPw8ySr1w.png</url>
            <title>Stories by Kiran Mayee N on Medium</title>
            <link>https://medium.com/@kiran.mayee?source=rss-860a4122753f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 19:48:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kiran.mayee/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Final Part]]></title>
            <link>https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-final-part-e6738e9e7292?source=rss-860a4122753f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6738e9e7292</guid>
            <category><![CDATA[search]]></category>
            <category><![CDATA[lucene]]></category>
            <category><![CDATA[aem-developer]]></category>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <dc:creator><![CDATA[Kiran Mayee N]]></dc:creator>
            <pubDate>Tue, 13 Aug 2024 04:03:35 GMT</pubDate>
            <atom:updated>2024-08-13T04:03:35.663Z</atom:updated>
            <content:encoded><![CDATA[<h3>Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Final Part</h3><p><strong>Welcome back, AEM enthusiasts!</strong></p><p>We’ve tackled the challenges of indexing management and crafted user-friendly search results with excerpts and highlighting. But what if users struggle to find the perfect search terms, or encounter those inevitable typos?</p><p>This article dives into the realm of advanced AEM search functionalities — synonyms, filters, and spell check. We’ll explore how these features empower users to refine their searches and navigate content with greater ease. Imagine a search experience that understands synonyms, helps filter through specific criteria, and even corrects typos on the fly — all leading to a more efficient and frustration-free journey for your users.</p><p><strong>Building on a Strong Foundation</strong></p><p>This article assumes you’ve read the previous installments in our AEM search optimization series. If you haven’t yet, we recommend starting with “Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality” Series to ensure your search engine has a solid foundation.</p><p><strong>Previously Covered in this series:</strong></p><ul><li><strong>Search Suggestion Servlets</strong></li></ul><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-1-effbbc4ab5e9">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality- Part 1</a></p><ul><li><strong>Optimizing Search with AEM Indexing Management</strong></li></ul><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-2-d8c66b59c1ef">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 2</a></p><ul><li><strong>Craft Compelling Search Results: Highlighting Keywords &amp; Controlled Excerpts</strong></li></ul><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-3-dff0fa1a5e52">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 3</a></p><p>Now, let’s unlock the full potential of AEM search with these powerful functionalities!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LJaouKmgR6dr8Fu3X3waQg.png" /></figure><h3>Empower User Searches: Synonyms, Filters &amp; Spell Check</h3><p>Imagine searching for “sneakers” and finding results not just for that exact term, but also for “trainers” and “athletic shoes.” This is the magic of synonyms in search.</p><p><strong>Synonyms: Expanding the Search Net</strong></p><p>When you enter a search query, the system doesn’t just look for that specific word. It also considers synonyms — words with similar meanings. This broadens the search scope, ensuring you find content even if you don’t use the exact terminology used in the content itself. These words could be defined in the “<em>Synonyms.txt</em>” file in the Index, as shown in the <a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-2-d8c66b59c1ef#bba6">Index Management Article</a> (Part 2 : Section <strong>4.3.3 </strong>in this series).</p><p>Eg:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KqTYFzbwVoeXyCaH" /></figure><p>Here though, my Fulltext Search Query Term is “<em>Pharmaceuticals</em>”. It still includes results that contain the word “<em>Pharmacy</em>” too. Since the same is configured in my Synonyms.txt file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/0*XJCzCFApVls1hVPT" /></figure><p>Search systems don’t stop at synonyms. They can also dynamically extract filters based on your query. This means the search itself suggests potential ways to refine your results and pinpoint exactly what you’re looking for.</p><p><strong>Dynamic Filters: Refining Your Search Journey</strong></p><p>Here’s a simplified illustration:</p><p>Imagine searching for “hiking trails.” The system might automatically identify filters like “region,” “difficulty level,” or “length” based on the query and the content available. You can then use these filters to narrow down your search and find the perfect hiking trail for your needs.</p><p>Learn more about: <a href="https://lucene.apache.org/core/4_0_0/facet/org/apache/lucene/facet/doc-files/userguide.html">Lucene Faceted Search</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*STqWJ6FECGeb6Ut0" /></figure><p>AEM allows you to extract filters dynamically based on search queries, enhancing the user experience by suggesting relevant ways to refine their search. Here’s a breakdown of how you might achieve this using Java code:</p><p>Identifying Filter Categories:</p><p>The first step involves identifying potential filter categories based on your search query and content structure. This can be achieved through:</p><ul><li><strong>Predefined Rules:</strong> Define rules that map specific terms or patterns within the query to filter categories. For example, terms like “location” or “city” might trigger the “region” filter category.</li><li><strong>Taxonomy Analysis:</strong> If you utilize taxonomies within your content, analyze the query against the taxonomy structure to identify relevant categories.</li></ul><p>Bucket-based Approach:</p><p>One common approach for filter extraction involves using buckets:</p><ul><li><strong>Bucket Creation:</strong> As the search results are processed, create buckets for each identified filter category. Each bucket will hold information about the specific filter options within that category (e.g., different regions or topics).</li><li><strong>Populating Buckets:</strong> Iterate through the search results and analyze the content based on your predefined rules or taxonomy mapping. When a relevant term is encountered, add it to the corresponding bucket. For example, if the content mentions “California,” it would be added to the “region” bucket with the value “California.”</li></ul><p>Processing Bucket Data:</p><p>Once you have populated the buckets with relevant filter options:</p><ul><li><strong>Create Filter Data Structures:</strong> Iterate through each bucket and construct the data structure representing the filter category and its available options. This might involve creating JSON objects or other data structures suitable for your chosen UI framework.</li><li><strong>Handle Duplicates:</strong> You might want to remove duplicate entries within each filter category to provide a cleaner user experience. Utilize helper methods to identify and eliminate duplicates based on your specific needs.</li></ul><p><strong>Code Example 1:</strong></p><pre>// Assuming a Bucket class exists to hold filter options<br>public void extractFilters(SearchResult result, List&lt;String&gt; filterCategories, Map&lt;String, Bucket&gt; filterMap) {<br>  // Analyze query and content to identify relevant filter categories<br>  for (String category : filterCategories) {<br>    Bucket bucket = new Bucket(category);<br>    // (Logic to populate bucket based on predefined rules or taxonomy analysis)<br>    filterMap.put(category, bucket);<br>  }<br><br>  // Process content within search results<br>  List&lt;ContentNode&gt; contentNodes = result.getContentNodes();<br>  for (ContentNode node : contentNodes) {<br>    // (Logic to analyze content and add relevant information to buckets)<br>  }<br><br>  // Construct filter data structures and handle duplicates (implementation details omitted)<br>}</pre><p><strong>Code Example 2: </strong>where “1_group.1_property”<strong> </strong>is a predicate used in the Query</p><pre>Map&lt;String, Facet&gt; facets = result.getFacets();<br><br>if (facets.containsKey(&quot;1_group.1_property&quot;)) {<br>                            facets.get(&quot;1_group.1_property&quot;).getBuckets().forEach(bucket -&gt; getFacetData(bucket, topicData, difficultyLevel, filterData,<br>                                    heading, filterData1, heading1));<br>                        }<br>                        <br> private void getFacetData(Bucket bucket, List&lt;Tag&gt; topicData, List&lt;Tag&gt; difficultyLevel,<br>                              JSONArray filterData, JSONObject heading, JSONArray filterData1, JSONObject heading1) {<br>        try {<br>            Tag tagName = tagManager.resolve(bucket.getValue());<br>            // (Logic to analyze content and add relevant information to buckets)<br>        } catch (JSONException jsonException) {<br>            LOG.error(&quot;JSON exception when adding to Json Object, {}&quot;,<br>                    jsonException.getMessage());<br>        }<br>    }     </pre><p><strong>Important Note:</strong></p><p>This is a simplified illustration, and the actual implementation will depend on your specific AEM setup, content structure, and desired filter options. The key aspects involve identifying filter categories, populating buckets, and constructing the final filter data structure.</p><p><strong>Benefits of Synonyms and Dynamic Filters:</strong></p><ul><li><strong>More Comprehensive Results:</strong> Synonyms prevent you from missing relevant content simply because you didn’t use the exact keyword.</li><li><strong>Enhanced Search Accuracy:</strong> Dynamic filters help you refine your search journey, leading to more precise and focused results.</li><li><strong>Improved User Experience:</strong> By understanding your intent and suggesting relevant filters, the search system empowers you to navigate information efficiently.</li></ul><p><strong>Fun Fact!</strong></p><p>We can actually see the facets that could be extracted for a particular set of results in the Query Builder Debugger Tool too. By Selecting the ‘Extract facets’ Checkbox as shown in the below Video. Reference : <a href="https://youtu.be/__lz5d7-94M?si=dEe6e1SRkf888egK">AEM QueryBuilder Demo Part 2 — Facets</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bh7B4ASarM7n08Tl" /></figure><p><strong>Spell Check Activation:</strong></p><p>Ever typed a search query and ended up with unexpectedly zero results? Typos happen, and they can be frustrating when navigating search systems. Thankfully, AEM’s spell check functionality can come to the rescue!</p><p><strong>What is Spell Check Activation?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/0*cUzbdlTEkeAflukR" /></figure><p>Spell Check activation is a feature that helps users overcome typos and misspellings in their search queries. When enabled, the search system leverages a spellchecker to analyze the query for potential errors. If a misspelling is detected, the system suggests corrected terms, allowing users to refine their search and find the information they need more efficiently.</p><p><strong>Code Example 1:</strong></p><pre>import org.apache.lucene.search.spell.SpellChecker;<br><br>public class SearchService {<br><br>    private final SpellChecker spellChecker;<br><br>    public SearchService(SpellChecker spellChecker) {<br>        this.spellChecker = spellChecker;<br>    }<br><br>    public SearchResult executeSearch(String query, boolean enableSpellcheck) throws IOException {<br>        String correctedQuery = query;<br>        if (enableSpellcheck) {<br>            Set&lt;String&gt; suggestions = spellChecker.suggestSimilar(query, 5);<br>            if (!suggestions.isEmpty()) {<br>                correctedQuery = suggestions.iterator().next();<br>            }<br>        }<br>        // Perform search using the corrected query<br>        return performSearch(correctedQuery);<br>    }<br><br>    // Implementation for performSearch(...) to execute the search with the corrected query<br>}</pre><p><strong>Code Example 2:</strong></p><pre>import com.day.cq.search.suggest.Suggester;<br><br>@Inject<br>private Suggester suggester;<br>    <br>private Session session;<br><br>public String searchWithSpellcheck(ResourceResolver resolver, String fullTextQuery, int limit, int offset) throws IOException {<br>    if (isSpellCheckEnabled()) {<br>        String correctedQuery = spellCheckQuery(fullTextQuery);<br>        return correctedQuery != null ? getResults(limit, offset, correctedQuery) : getResults(limit, offset, fullTextQuery);<br>    } else {<br>        return getResults(limit, offset, fullTextQuery);<br>    }<br>}<br><br>private String spellCheckQuery(String fullTextQuery) {<br>    StringJoiner correctedWords = new StringJoiner(&quot; &quot;);<br>    for (String word : fullTextQuery.split(&quot; &quot;)) {<br>        String suggestion = suggester.spellCheck(session, word);<br>        correctedWords.add(suggestion != null ? suggestion : word);<br>    }<br>    return correctedWords.toString();<br>}</pre><p><strong>Important Note:</strong></p><p>This is a simplified illustration, and the actual implementation will depend on your specific AEM setup, content structure and code etc.</p><p>Congratulations! You’ve reached the final chapter in our exploration of AEM Lucene Search optimization. Throughout this series, we’ve covered a range of techniques to empower users and elevate the overall search experience:</p><ul><li><strong>Search Suggestion Servlets:</strong> We briefly introduced the concept of search suggestion servlets, highlighting their ability to guide users towards relevant content through real-time suggestions.</li><li><strong>Optimizing Search with AEM Indexing Management:</strong> We laid the groundwork by understanding the importance of efficient indexing for accurate and speedy search results.</li><li><strong>Craft Compelling Search Results: Highlighting Keywords &amp; Controlled Excerpts:</strong> We explored how keyword highlighting and excerpts can transform search results into user-friendly snippets, saving users valuable time.</li><li><strong>Empower User Searches: Synonyms, Filters &amp; Spell Check:</strong> We unveiled advanced functionalities like synonyms, filters, and spell check, allowing users to refine their searches with greater precision.</li></ul><p><strong>By leveraging these enhancements for AEM Lucene Search, organizations can significantly optimize search functionality and deliver superior user experiences.</strong> As AEM developers and administrators, we can tailor search experiences that perfectly align with the unique needs of our digital properties.</p><p>Remember, the journey towards an exceptional AEM search experience is a continuous one. AEM Lucene Search remains a powerful tool that can evolve alongside your website, fostering content discoverability, user engagement, and ultimately, a successful digital presence.</p><p><strong>Happy searching, and keep exploring the possibilities!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6738e9e7292" width="1" height="1" alt=""><hr><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-final-part-e6738e9e7292">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Final Part</a> was originally published in <a href="https://medium.com/activate-aem">Activate AEM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 3]]></title>
            <link>https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-3-dff0fa1a5e52?source=rss-860a4122753f------2</link>
            <guid isPermaLink="false">https://medium.com/p/dff0fa1a5e52</guid>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[lucene]]></category>
            <category><![CDATA[aem-developer]]></category>
            <category><![CDATA[search]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <dc:creator><![CDATA[Kiran Mayee N]]></dc:creator>
            <pubDate>Tue, 30 Jul 2024 14:16:52 GMT</pubDate>
            <atom:updated>2024-07-30T14:16:52.719Z</atom:updated>
            <content:encoded><![CDATA[<h3>Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 3</h3><p><strong>Hey there, AEM users!</strong></p><p>You’ve conquered the initial search hurdle — you’ve found the relevant content! But sifting through lengthy content previews can still be time-consuming. What if you could instantly identify the information you need?</p><p>This article dives into the world of crafting compelling search results on AEM. We’ll explore features like keyword highlighting and controlled excerpts, designed to make your search experience efficient and user-friendly. Imagine finding the exact answer you seek within seconds, thanks to highlighted keywords that pinpoint the most relevant sections of the content.</p><p><strong>Building on a Strong Foundation</strong></p><p>This article assumes you’ve read the previous installments in our AEM search optimization series. If you haven’t yet, we recommend starting with “Optimizing Search with AEM Indexing Management” to ensure your search engine has a solid foundation of well-indexed content.</p><p><strong>Upcoming Article in this Series!</strong></p><ul><li><strong>Empower User Searches: Synonyms, Filters &amp; Spell Check :</strong> Expanding search capabilities to include synonyms and filters, and helping users out with those pesky typos.</li></ul><p><strong>Previously Covered in this series:</strong></p><ul><li><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-1-effbbc4ab5e9">Search Suggestion Servlets</a></li></ul><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-1-effbbc4ab5e9">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality- Part 1</a></p><ul><li><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-2-d8c66b59c1ef">Optimizing Search with AEM Indexing Management</a></li></ul><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-2-d8c66b59c1ef">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 2</a></p><p>Now, let’s get started on crafting search results that truly impress!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFSZJjcXHrhXA_j6Y7Jiiw.png" /></figure><h3>Craft Compelling Search Results: Highlighting Keywords &amp; Controlled Excerpts</h3><p>Imagine searching for a specific topic within your AEM website. Highlighting the search terms within the results is helpful, but wouldn’t it be even better to see a surrounding snippet of text providing context? This is where excerpts come in.</p><p><strong>Excerpts and Keyword Highlighting within</strong></p><p>Excerpts are brief text passages extracted from the content around the matched keywords. By displaying excerpts alongside search results, you offer users a glimpse into the content’s relevance without requiring them to visit every single page. This can significantly improve the search experience by:</p><ul><li><strong>Providing Context:</strong> Users can quickly understand how the search term is used within the content, improving their ability to judge relevance at a glance.</li><li><strong>Saving Time:</strong> By previewing the content, users can determine if a specific result meets their needs without needing to navigate to the full page.</li><li><strong>Enhancing Engagement:</strong> A more informative search experience keeps users engaged and focused on finding the information they seek.</li></ul><p><strong>Enabling Excerpts in AEM</strong></p><p>Adobe Experience Manager (AEM) provides two primary methods for utilizing excerpts in search results:</p><p><strong>1. p.excerpt in Query Predicates (Limited Functionality)</strong></p><ul><li>p.excerpt refers to the ability to include excerpts of matching content in search results.</li><li>However, in current versions of AEM, enabling p.excerpt in query predicates might not directly display excerpts within the search results themselves until hit.getExcerpt is used to extract the Excerpt.</li><li>The documented behavior might be outdated or specific to certain AEM configurations or debugging tools like the Query Builder debugger shown below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kJYQH2m7q9darMC9" /></figure><p><strong>Disclaimer:</strong></p><p>While my testing suggests limitations with p.excerpt in conjunction with hit.getExcerpt led to redundant result hits programmatically and slower server response times.</p><p>It’s important to acknowledge that others might have different experiences or AEM configurations that yield different results. If you have a different perspective on p.excerpt functionality, please share your insights!</p><p><strong>2. hit.getExcerpt Method (Recommended Approach):</strong></p><ul><li>When reading search results programmatically, developers can use the <em>hit.getExcerpt()</em> method to retrieve the excerpt of the matched content directly from the search result object.</li><li>This method allows developers to programmatically access and display excerpts in custom search result templates or components.</li></ul><p>Example 1 using <strong>p.excerpt=true</strong></p><pre>2_group.fulltext = keyword<br>2_group.p.or = true<br>9_orderby = orderbydate<br>9_orderby.sort = desc<br>group.1_group.property = sling:resourceType<br>group.1_group.property.1_value = generic-company/components/content/article<br>group.1_group.type = nt:unstructured<br>group.2_group.property = jcr:content/sling:resourceType<br>group.2_group.property.value = generic-company/components/structure/page/basepage<br>group.2_group.type = cq:Page<br>group.p.or = true<br>p.facets = true<br>p.limit = 10<br>p.offset = 0<br>p.excerpt = true<br>path = /content/generic-company/content/</pre><p>Example 2 using <strong>hit.getExcerpt</strong></p><pre>private static Map&lt;String, Object&gt; addOtherData(final Hit hit, Map&lt;String, Object&gt; map)<br>    throws RepositoryException {<br>  final Resource resource = hit.getResource();<br>  final ValueMap properties = resource.adaptTo(ValueMap.class);<br>  map.put(CF_PATH, resource.getPath());<br>  map.put(CF_NAME, resource.getName());<br>  map.put(CF_TITLE, properties.get(&quot;jcr:title&quot;, resource.getName()));<br>  map.put(CF_EXCERPT, hit.getExcerpt());<br>  map.put(CF_LAST_MODIFIED, getLastModified(resource));<br>  map.put(CF_TYPE, &quot;Data&quot;);<br>  return map;<br>}</pre><p><strong>Results:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gCRiXN8H8u2GolyeGMgTdg.png" /></figure><p><strong>Explanation:</strong></p><p>The excerpt generation process in AEM involves highlighting the matched keywords within the retrieved content. AEM automatically generates excerpts for search results, and it includes HTML markup to highlight the matched keywords, typically using &lt;strong&gt; tags. This highlighting method visually distinguishes the matched keywords within the excerpts, making it easier for users to identify relevant content snippets.</p><p>Ever searched for something online and ended up with results that felt incomplete or irrelevant? One reason for this can be generic excerpts that don’t accurately reflect the content’s core message. Thankfully, AEM’s Controlled Excerpt Properties offer a solution.</p><p><strong>Controlled Excerpt Properties:</strong></p><p><strong>What are Controlled Excerpt Properties?</strong></p><p>This feature empowers you to customize the properties used to generate excerpts displayed alongside search results. By specifying which properties to consider — like title, description, or custom fields — you can significantly improve the relevance and user experience of your AEM search.</p><p><strong>Benefits of Controlled Excerpt Properties:</strong></p><ul><li><strong>Enhanced Relevance:</strong> Users can quickly grasp the content’s focus by seeing relevant excerpts that highlight the search term within the context of specific properties. This helps them determine if a result is truly what they’re looking for, saving them valuable time and clicks.</li><li><strong>Improved User Experience:</strong> More informative excerpts lead to a more engaging search experience. Users can make informed decisions about which results to explore further based on the preview provided by the excerpt.</li><li><strong>Greater Control:</strong> You have the power to define which properties best represent the content and showcase the search term’s relevance. This level of control ensures excerpts accurately reflect your content and user needs.</li></ul><p><strong>How to Define Excerpt Properties:</strong></p><p>AEM utilizes the <em>com.day.cq.search.impl.builder.QueryBuilderImpl.cfg.json</em> file to configure various search functionalities. Within this file, you can define the properties you want to use for generating excerpts by specifying them under the “<em>excerpt.properties</em>” key. Here’s an example:</p><pre>{<br>    &quot;excerpt.properties&quot;: [<br>        &quot;jcr:description&quot;,<br>        &quot;text&quot;,<br>        &quot;jcr:title&quot;,<br>        &quot;bodyText&quot;<br>    ]<br>}<br><br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8eSTBIUkTyl7-BX9" /></figure><p>In this example, the excerpt will be generated by pulling text from the jcr:description, text, jcr:title, and bodyText properties of the content items.</p><p><strong>Happy searching! Excerpts and highlighted keywords are a powerful combo for user-friendly AEM search results. Stay tuned for the last article in this series “Empower User Searches: Synonyms, Filters &amp; Spell Check”!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dff0fa1a5e52" width="1" height="1" alt=""><hr><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-3-dff0fa1a5e52">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 3</a> was originally published in <a href="https://medium.com/activate-aem">Activate AEM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 2]]></title>
            <link>https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-2-d8c66b59c1ef?source=rss-860a4122753f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8c66b59c1ef</guid>
            <category><![CDATA[lucene]]></category>
            <category><![CDATA[search]]></category>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[aem-developer]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <dc:creator><![CDATA[Kiran Mayee N]]></dc:creator>
            <pubDate>Thu, 18 Jul 2024 15:50:27 GMT</pubDate>
            <atom:updated>2024-07-30T16:44:08.090Z</atom:updated>
            <content:encoded><![CDATA[<h3>Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 2</h3><p><strong>Hey there, AEM users!</strong></p><p>Struggling to find the content you need on your AEM site? Ever felt like you’re searching for a needle in a haystack? We’ve all been there. But fret no more! This series of blog posts is your guide to a supercharged AEM search experience.</p><p>We’ll be diving into some cool features that will make finding content a breeze. Think lightning-fast results, real-time suggestions as you type, and even highlighted keywords to pinpoint what you need instantly.</p><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-1-effbbc4ab5e9">In our previous article</a>, we explored the magic of search suggestion servlets — those helpful prompts that appear as you type, guiding you towards the content you crave. Now, let’s shift gears and focus on the foundation of a great search experience: AEM indexing management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IloC17eiFXSruHuNwv0fBA.png" /></figure><h3><strong>Optimizing Search with AEM Indexing Management</strong></h3><p>This article equips you with the knowledge to optimize your AEM search for accuracy, efficiency, and user satisfaction. We’ll delve into the core concepts of indexing management and explore best practices to keep your search results on point, even with a massive amount of content.</p><p><strong>Stay tuned for more!</strong></p><p>This series is just getting started. In the coming weeks, we’ll be exploring:</p><ul><li><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-3-dff0fa1a5e52"><strong>Craft Compelling Search Results: Highlighting Keywords &amp; Controlled Excerpts</strong></a><strong> :</strong> Making your search results super user-friendly by highlighting keywords and showing only the most relevant info.</li><li><strong>Empower User Searches: Synonyms, Filters &amp; Spell Check :</strong> Expanding search capabilities to include synonyms and filters, and helping users out with those pesky typos.</li></ul><p><strong>Previously Covered in this series:</strong></p><ul><li><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-1-effbbc4ab5e9">Search Suggestion Servlets</a></li></ul><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-1-effbbc4ab5e9">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality- Part 1</a></p><h3>Index Management</h3><p>A fundamental aspect of Adobe Experience Manager (AEM) is its indexing management, which plays a pivotal role in optimizing content search capabilities within the platform. Effective indexing is essential for ensuring that users can quickly retrieve relevant content. AEM’s indexing management revolves around various strategies aimed at enhancing the search experience.</p><p>Key components of AEM indexing management include:</p><ol><li><strong>Relevant Properties Inclusion:</strong></li></ol><p>AEM indexing management prioritizes the inclusion of relevant properties in the index. By selectively indexing properties that are crucial for search relevance, AEM ensures that search results are accurate and meaningful.</p><p><strong>Sample Index:</strong></p><pre>&lt;indexRules jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                &lt;nt:unstructured<br>                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                        includePropertyTypes=&quot;[String]&quot;&gt;<br>                        &lt;properties jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                                &lt;hideInNav<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        index=&quot;{Boolean}false&quot;<br>                                        name=&quot;hideInNav&quot; /&gt;<br>                                &lt;offTime<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        index=&quot;{Boolean}false&quot;<br>                                        name=&quot;offTime&quot; /&gt;<br>                                &lt;onTime<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        index=&quot;{Boolean}false&quot;<br>                                        name=&quot;onTime&quot; /&gt;<br>                                &lt;allowedTemplates<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        index=&quot;{Boolean}false&quot;<br>                                        name=&quot;cq:allowedTemplates&quot; /&gt;<br>                                &lt;childrenOrder<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        index=&quot;{Boolean}false&quot;<br>                                        name=&quot;cq:childrenOrder&quot; /&gt;<br>                                &lt;designPath<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        index=&quot;{Boolean}false&quot;<br>                                        name=&quot;cq:designPath&quot; /&gt;<br>                                &lt;resourceType<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        name=&quot;sling:resourceType&quot;<br>                                        propertyIndex=&quot;{Boolean}true&quot;<br>                                        weight=&quot;{Long}0&quot; /&gt;<br>                                &lt;resourceSuperType<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        name=&quot;sling:resourceSuperType&quot;<br>                                        propertyIndex=&quot;{Boolean}true&quot;<br>                                        weight=&quot;{Long}0&quot; /&gt;<br>                                &lt;prop<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        analyzed=&quot;{Boolean}true&quot;<br>                                        isRegexp=&quot;{Boolean}true&quot;<br>                                        name=&quot;^[^\\/]*$&quot;<br>                                        nodeScopeIndex=&quot;{Boolean}true&quot;<br>                                        useInExcerpt=&quot;{Boolean}true&quot; /&gt;<br>                                &lt;textField<br>                                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                                        boost=&quot;{Decimal}0.01&quot;<br>                                        index=&quot;{Boolean}true&quot;<br>                                        name=&quot;textField&quot; /&gt;<br>                        &lt;/properties&gt;<br>                &lt;/nt:unstructured&gt;<br>        &lt;/indexRules&gt;</pre><p>1.1 <strong>propertyIndex:</strong></p><ul><li>The <strong>propertyIndex</strong> attribute determines whether a property should be included in the Lucene index. When set to true (like with sling:resourceType and sling:resourceSuperType in our example), <strong>the property’s values are incorporated into the index</strong> and become searchable.</li><li>Properties like hideInNav likely have a dedicated attribute named <strong>index set to false to exclude them from indexing</strong>. The propertyIndex attribute is specifically used for properties you want to manage within the context of AEM indexing, allowing you to control their searchability.</li></ul><p>1.2 <strong>weight:</strong></p><ul><li>The <strong>weight</strong> attribute is used in conjunction with the <strong>propertyIndex </strong>attribute for properties of type sling:resourceType and sling:resourceSuperType. It allows you to specify a <strong>significance value for these properties</strong> within the search ranking.</li><li>In the provided configuration, both sling:resourceType and sling:resourceSuperType have a weight=”{Long}0&quot; setting. This means they are included in the index (propertyIndex=”{Boolean}true”) but aren’t given any extra weight in the ranking algorithm (weight=”{Long}0&quot;). Setting the weight to 0 explicitly communicates our intent. It clarifies that these properties, while indexed, shouldn’t receive any additional weight in the ranking algorithm beyond Lucene’s potential default boost (often 1.0).</li><li>Sets a baseline significance for the entire property within search ranking. It acts as a multiplier for the property’s overall influence.</li><li><em>Example:</em> A weight of 2 for the brand property indicates that documents matching the brand term will be considered twice as important as those matching description or price terms (assuming weight 1). This can significantly influence ranking even if terms aren’t boosted within the property.</li></ul><p>1.3 <strong>boost:</strong></p><ul><li>In AEM indexes built upon Lucene, <strong>boost</strong> is a factor assigned to a specific property or field that influences its importance during the search process. Properties with a higher boost value are considered more relevant by the search engine and will be ranked higher in search results.</li><li>In the provided configuration, you’ll see the boost attribute used with the textField property here. Each of these has a boost=”{Decimal}0.01&quot; setting. This indicates that content matching these properties will receive a slight increase in ranking compared to other properties without a boost.</li><li>This <strong>influences the importance of individual terms extracted from the property value</strong> during indexing. However, it’s not explicitly defined in the configuration.The boost value we set for the entire property in the AEM configuration (e.g., “boost=0.5” for the title property) might be applied to these individual terms created by Lucene during tokenization.</li></ul><h4>Understanding the Nuances of Boost and Weight</h4><p><strong>Key Differences:</strong></p><ul><li><em>Granularity:</em> Boost applies to individual terms within a property, increases/decreases importance of individual terms, while Weight applies to the entire property, Sets baseline significance for the entire property.</li><li><em>Customization:</em> Boost allows for more granular control over the importance of specific terms. Weight focuses on the overall significance of a property.</li></ul><h4>Scenario</h4><p>Imagine we have an e-commerce site with products that have properties like title, description, brand, and price. We want to prioritize searches based on title and brand while considering descriptions and price to some extent.</p><p><em>Boost:</em></p><p>Boosting Titles: We can assign a boost to the title property. Let’s say a boost of 0.5. This means terms found in the product title will have a significant impact on the search score. A product with a title that exactly matches the search term will rank higher compared to products where the term only appears in the description.</p><p>Example: Search Term: “Running shoes”</p><ul><li>Product A: Title: “Nike Running Shoes — Zoom Pegasus”, Description: “Comfortable running shoes…” (Boost applied to Title)</li><li>Product B: Title: “Everyday Sneakers”, Description: “These shoes are great for running…”</li></ul><p>In this case, Product A would likely rank higher because the search term “Running shoes” is present in its boosted title.</p><p><em>Weight:</em></p><p>Prioritizing Brands: We can set a higher weight for the brand property compared to description and price. Let’s say a weight of 2 for brand and a weight of 1 for the others. This tells the search algorithm that brand is a more important factor for ranking than descriptions or prices.</p><p>Example: Search Term: “Adidas shoes”</p><ul><li>Product A: Title: “Running Shoes”, Brand: “Adidas”, Description: “…” (High Weight for Brand)</li><li>Product B: Title: “Adidas Comfort Shoes”, Brand: “Unknown”, Description: “These are comfortable shoes…”</li></ul><p>Here, Product A might rank higher even though Product B has “Adidas” in its title (without boost). This is because the weight assigned to the brand property gives it more influence in the overall ranking.</p><p>If we introduce a boost for the title property in the scenario, the ranking dynamics between Product A and Product B would change.The outcome depends on the relative strength of the boost applied to the title and the weight assigned to the brand property.</p><p>1.4 <strong>analyzed=”{Boolean}true”:</strong></p><ul><li>The analyzed attribute <strong>controls how the property’s value is processed before being indexed</strong>. When set to true (like with the prop property in our example), Lucene performs text analysis on the property value. This analysis typically involves breaking text into individual terms, lowercase conversion, and potentially stemming (reducing words to their root form).</li><li>By enabling analysis, you ensure Lucene can effectively understand and match the content of the property during searches.</li></ul><p>1.5 <strong>isRegexp=”{Boolean}true”:</strong></p><ul><li>The isRegexp attribute applies to the prop property in our example and is set to true. This indicates that the name attribute (defined as ^[^\\/]*$) for the prop property specifies a regular expression.</li><li>Regular expressions are powerful tools for pattern matching in text. In this case, the provided regular expression ^[^\\/]*$ matches any string that doesn’t contain a forward slash character (/). This might be <strong>useful for indexing property names that follow a specific format or convention within our content</strong>.</li></ul><p>1.6 <strong>nodeScopeIndex=”{Boolean}true”:</strong></p><ul><li>The nodeScopeIndex attribute applies to the prop property and is set to true here. This setting instructs Lucene <strong>to index the ‘property’ value not only on the current node but also on all child nodes</strong> below it in the content hierarchy.</li><li>This can be beneficial if the property you’re indexing exists on multiple levels of your content structure and you want searches to find matches regardless of the node depth. To say, enabling nodeScopeIndex in AEM ensures that searches on pages (cq:Page nodes) return results even when the content is located within child nodes beneath the cq:Page node.</li></ul><p><strong>Example:</strong> With nodeScopeIndex enabled for the title property of a product page, searches will consider the title from both the page node and any child content nodes.</p><p>1.7 <strong>useInExcerpt=”{Boolean}true”:</strong></p><ul><li>The useInExcerpt attribute applies to the prop property and is set to true here. This setting allows Lucene to include the value of the prop property in search result excerpts.</li><li>Search results often display a short snippet of the content around the matched keywords. By enabling useInExcerpt, you’re making the prop <strong>property’s content eligible to be included in the excerpts</strong>, potentially improving the context and clarity of the search results.</li></ul><p><strong>2. Exclusion of Unnecessary Properties:</strong></p><p>Conversely, unnecessary properties are excluded from indexing. This approach streamlines the indexing process and prevents cluttering of the index with irrelevant data, leading to more efficient searches and avoiding false-positive matches.</p><p><strong>Sample Index Snippet:</strong></p><pre> ...<br>        excludedPaths=&quot;[/var,/etc/replication,/etc/workflow/instances,/jcr:system]&quot;<br>        includedPaths=&quot;[/content/kiran-sample]&quot;<br>        ..<br>        queryPaths=&quot;[/content/kiran-sample]&quot;<br>        type=&quot;lucene&quot;&gt;<br>        .....</pre><p>Let’s break down the properties in the above AEM index configuration:</p><p>2.1<strong>excludedPaths=”[/var,/etc/replication,/etc/workflow/instances,/jcr:system]”:</strong></p><p>This property specifies paths that are deliberately excluded from the indexing process. Here’s what’s excluded:</p><ul><li><strong>/var:</strong> This folder typically stores temporary data and configurations, which are not relevant for searching content.</li><li><strong>/etc/replication:</strong> This path likely contains replication-related configurations that don’t need to be searched.</li><li><strong>/etc/workflow/instances:</strong> This folder holds workflow instance data, not actual content for searching.</li><li><strong>/jcr:system:</strong> This is the root folder for the content repository system itself and shouldn’t be included in searches.</li></ul><p>2.2 <strong>includedPaths=”[/content/kiran-sample]”:</strong></p><p>This property defines the specific path that will be indexed. In this case, only the content located at /content/kiran-sample will be included in the index. This ensures the index focuses on the relevant content and avoids unnecessary data.</p><p>2.3 <strong>queryPaths=”[/content/kiran-sample]”:</strong></p><p>This property plays a crucial role in search queries. It specifies the paths that the search engine will consider when evaluating search queries. Even though it has the same value as includedPaths in this example, there’s a subtle difference:</p><ul><li>includedPaths determines what gets indexed.</li><li>queryPaths determines which paths are eligible to be matched during searches.</li></ul><p>In essence, searches will only find results within the path specified by queryPaths. So, if you have subfolders within /content/kiran-sample, queries will only find content within those subfolders if they are included in queryPaths.</p><p>Imagine you have a website with product information and blog posts:</p><ul><li><strong>includedPaths:</strong> Set to /content/website to index both product and blog post content.</li><li><strong>queryPaths:</strong> Set to /content/website/products only. This allows searches to find products, but excludes blog posts from search results even though they are indexed.</li></ul><p><strong>Why Use Different Values?</strong></p><p>Here are some reasons you might choose different values for includedPaths and queryPaths:</p><ul><li><strong>Restricting Search Scope:</strong> As in the example above, you might want to exclude certain types of content from search results even though they are indexed for potential future use.</li><li><strong>Security:</strong> You might index sensitive information but restrict search access to authorized users through queryPaths.</li><li><strong>Performance Optimization:</strong> For very large indexes, you could strategically use queryPaths to limit the search area, potentially improving search performance.</li></ul><p><strong>Optimizing our excludedPaths</strong></p><p>The provided sample excludes common system folders. Here’s an important point:</p><p>It’s generally more efficient to use includedPaths to specify the content you want to index. By default, system folders like /var and /etc are excluded. This approach ensures clarity and avoids the need to manage a potentially lengthy list of excluded paths, especially if your content structure is extensive.</p><p>However, excludedPaths can still be useful in specific scenarios. For instance, if you have a subpage under an includedPaths (like <strong>/content/kiran-sample/draft-pages</strong>) that you want to include in the index, you can leverage excludedPaths to achieve that granularity.</p><p><strong>3.Aggregates</strong></p><p>Aggregates consolidate content properties, enabling efficient retrieval of related information. By defining aggregates, AEM optimizes the organization of indexed data, enhancing the search experience for users.</p><p><strong>Sample Index Snippet:</strong></p><pre>&lt;aggregates jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>  &lt;nt:unstructured jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>    &lt;include0<br>        jcr:primaryType=&quot;nt:unstructured&quot;<br>        path=&quot;textPar&quot; /&gt;<br>    &lt;include1<br>        jcr:primaryType=&quot;nt:unstructured&quot;<br>        path=&quot;textPar/*&quot; /&gt;<br>    &lt;include2<br>        jcr:primaryType=&quot;nt:unstructured&quot;<br>        path=&quot;textPar/*/*&quot; /&gt;<br>    &lt;include3<br>        jcr:primaryType=&quot;nt:unstructured&quot;<br>        path=&quot;textPar/*/*/*&quot; /&gt;<br>    &lt;include4<br>        jcr:primaryType=&quot;nt:unstructured&quot;<br>        path=&quot;textPar/*/*/*/*&quot; /&gt;<br>  &lt;/nt:unstructured&gt;<br>&lt;/aggregates&gt;</pre><p><strong>Understanding Aggregation with textPar:</strong></p><p>In AEM indexes built upon Lucene, aggregation allows you to accumulate values from the textPar property and its child properties up to four levels deep for indexing purposes. This can be beneficial when our content has properties with hierarchical structures.</p><p>Here’s a breakdown of how the include elements work with textPar:</p><ul><li>include0 with path=”textPar”: This includes the direct values of the textPar property itself in the index.</li><li>include1 with path=”textPar/*”: This gathers the values of any child properties directly under textPar. For example, if textPar has child properties like heading and subheading, their values would be included.</li><li>include2 to include4 follow the same logic, progressively including the values of child properties within the previously included properties, reaching up to four levels deep from the initial textPar property.</li></ul><p><strong>Why Aggregate Properties?</strong></p><p>The reasons for configuring aggregation remain the same:</p><ul><li><strong>Improved Search Relevance:</strong> By including values from child properties, searches might have a better chance of finding relevant content, even if the search term directly matches a value within a nested property under textPar.</li><li><strong>Faceted Search Functionality:</strong> Aggregation can be useful for creating faceted navigation, where users can filter search results based on the values of these aggregated properties within the textPar hierarchy.</li></ul><p><strong>Important Considerations:</strong></p><ul><li>Extensive aggregation can increase the size of our index. Ensure you only aggregate properties that are truly valuable for searching to maintain optimal performance.</li><li>Define the appropriate depth of aggregation based on our content structure and search needs. Including values from very deep levels might not be necessary or beneficial.</li></ul><p><strong>4.Analyzers</strong></p><p>Analyzers process text before indexing, applying various transformations to improve search accuracy. AEM provides flexible options for configuring analyzers, allowing users to tailor the indexing process to their specific requirements.</p><p><strong>Sample Index Snippet:</strong></p><pre>&lt;analyzers jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                &lt;default jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                    &lt;charFilters jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                        &lt;HTMLStrip jcr:primaryType=&quot;nt:unstructured&quot;/&gt;<br>                        &lt;Mapping jcr:primaryType=&quot;nt:unstructured&quot;/&gt;<br>                    &lt;/charFilters&gt;<br>                    &lt;tokenizer<br>                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                        name=&quot;Standard&quot;/&gt;<br>                    &lt;filters jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                        &lt;Synonym<br>                            jcr:primaryType=&quot;nt:unstructured&quot;<br>                            format=&quot;solr&quot;<br>                            ignoreCase=&quot;true&quot;<br>                            synonyms=&quot;synonyms.txt&quot;&gt;<br>                            &lt;synonyms.txt/&gt;<br>                        &lt;/Synonym&gt;<br>                        &lt;LowerCase jcr:primaryType=&quot;nt:unstructured&quot;/&gt;<br>                        &lt;Stop<br>                            jcr:primaryType=&quot;nt:unstructured&quot;<br>                            words=&quot;stop.txt&quot;&gt;<br>                            &lt;stop.txt/&gt;<br>                        &lt;/Stop&gt;<br>                        &lt;PorterStem jcr:primaryType=&quot;nt:unstructured&quot;/&gt;<br>                    &lt;/filters&gt;<br>                &lt;/default&gt;<br>            &lt;/analyzers&gt;<br></pre><p>this code snippet configures an analyzer that performs the following actions on text before it’s indexed:</p><ul><li>Removes HTML tags and potentially other markup (using HTMLStrip).</li><li>Performs character remapping if necessary (using Mapping).</li><li>Splits the text into individual terms (using StandardTokenizer).</li><li>Applies synonyms for improved search recall (using Filters).</li><li>Converts terms to lowercase for case-insensitive searching (using Filters).</li><li>Removes stopwords for efficiency (using Filters).</li><li>Applies stemming to potentially match different variations of the same word (using Filters).</li></ul><p>4.1 <strong>charFilters</strong>:</p><p>CharFilters preprocess text by removing or modifying specific characters. AEM supports the configuration of character filters to ensure that indexed content is clean and standardized, leading to more consistent search results.</p><p>Character filters are like text cleaners that modify text before it gets indexed. They can perform various actions, including:</p><ul><li><strong>Lowercasing:</strong> Converting all characters to lowercase (e.g., “Hello World” becomes “hello world”). This ensures case-insensitive searching, where searches for “HELLO” or “hello” would yield the same results.</li><li><strong>Accenting Handling:</strong> Converting accented characters to their base characters (e.g., “à” becomes “a”, “ä” becomes “a”). This improves search consistency by ensuring variations caused by accents don’t hinder results.</li><li><strong>Symbol Removal:</strong> Removing punctuation marks, special symbols, or other characters deemed irrelevant for searching (e.g., removing “&amp;” or “$” from text).</li></ul><p>4.2 <strong>Tokenizers</strong>:</p><p>Tokenizers break down text into individual terms or tokens, facilitating more granular search queries. AEM allows the configuration of tokenizers to suit the linguistic characteristics of the indexed content, leading to more accurate search results.</p><p><strong>Sample Index Snippet:</strong></p><pre>&lt;tokenizer<br>                        jcr:primaryType=&quot;nt:unstructured&quot;<br>                        name=&quot;Standard&quot;/&gt;</pre><p>Lucene offers various tokenizer implementations, each with different functionalities. The StandardTokenizer is a general-purpose tokenizer that performs the following actions on the input text:</p><ul><li><strong>Splits text at whitespace characters:</strong> This includes spaces, tabs, newlines, etc.</li><li><strong>Removes certain control characters:</strong> Characters deemed unsuitable for indexing are eliminated.</li></ul><p>It removes characters that wouldn’t be helpful for searching, like weird symbols or formatting marks.</p><p>Eg: Strange symbol &amp;%$# might disappear.</p><ul><li><strong>Handles alphabetic characters:</strong> Letters are separated into individual terms. It sees letters and separates them into individual terms, like building blocks for searching.</li></ul><p>Eg: “Hello World” becomes “Hello” “World” (separate words)</p><ul><li><strong>Handles alphanumeric strings:</strong> Words containing both letters and numbers are typically kept as single terms. However, you might need custom configurations depending on your specific needs.</li></ul><p>Eg: A product code like “Product101” stays together, but you might need special rules for some cases.</p><p>4.3 <strong>Analyzer Filters</strong>:</p><p>Filters are employed to refine search results based on specific criteria, such as metadata or content attributes. By adding filters, AEM enhances the precision of search queries and ensures that users find exactly what they are looking for.</p><p><strong>Sample Index Snippet:</strong></p><pre> &lt;filters jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                        &lt;Synonym<br>                            jcr:primaryType=&quot;nt:unstructured&quot;<br>                            format=&quot;solr&quot;<br>                            ignoreCase=&quot;true&quot;<br>                            synonyms=&quot;synonyms.txt&quot;&gt;<br>                            &lt;synonyms.txt/&gt;<br>                        &lt;/Synonym&gt;<br>                        &lt;LowerCase jcr:primaryType=&quot;nt:unstructured&quot;/&gt;<br>                        &lt;Stop<br>                            jcr:primaryType=&quot;nt:unstructured&quot;<br>                            words=&quot;stop.txt&quot;&gt;<br>                            &lt;stop.txt/&gt;<br>                        &lt;/Stop&gt;<br>                        &lt;PorterStem jcr:primaryType=&quot;nt:unstructured&quot;/&gt;<br>                    &lt;/filters&gt;</pre><p><strong>In essence, this code snippet configures Lucene to:</strong></p><ul><li>Use synonyms to improve search recall by matching content that uses synonymous terms.</li><li>Exclude stopwords to reduce index size and improve search efficiency.</li><li>Convert terms to lowercase for case-insensitive searching.</li><li>Apply Porter stemming to potentially match different variations of the same word.</li></ul><p>We will see what Synonyms and Stop Words do in a while. Now, let’s first break down the <strong>LowerCase Filter &amp; Porter Stemmer</strong> then.</p><p><strong>4.3.1 LowerCase Filter:</strong></p><ul><li>The &lt;LowerCase&gt; element ensures all terms are converted to lowercase before further processing. This helps improve search matching as users might use different capitalization styles in their queries.</li></ul><p><strong>4.3.2 Porter Stemmer:</strong></p><ul><li>The &lt;PorterStem&gt; element applies the Porter Stemming algorithm. This algorithm reduces words to their root form (e.g., “running” becomes “run”). This can improve search recall by matching different variations of the same word.</li></ul><p><strong>Configuration of Synonyms and Stopwords</strong>:</p><p>AEM allows the configuration of synonyms and stopwords, which enriches the search experience by accounting for variations in language usage and excluding common, non-descriptive terms.</p><p>AEM indexes leverage Apache Lucene for searching, and Lucene offers functionalities to manage synonyms and stopwords during the indexing process. Here’s a breakdown of how you can configure them:</p><p><strong>4.3.3 Synonyms:</strong></p><p>Synonyms are words or phrases that have the same or similar meanings. By including synonyms in our index, you can improve search recall by allowing searches to match content that uses synonymous terms.</p><p>AEM doesn’t directly manage synonyms within the index configuration itself. Instead, it relies on an external synonym file. Here’s how to configure synonyms:</p><ul><li><strong>Create a Synonym File:</strong> Create a plain text file with the .txt extension. In each line of the file, specify synonyms separated by commas or whitespace.</li></ul><p>For example: car, automobile buy, purchase</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/0*h9FbhH5Izel0yZzO" /></figure><ul><li><strong>Reference the Synonym File in the Index:</strong> Within the &lt;analyzers&gt; section of our AEM index configuration, locate the &lt;default&gt; analyzer. Here, you’ll find a section named &lt;filters&gt;. Add a &lt;Synonym&gt; element with the following attributes:</li></ul><p>format=”solr” (specifies the synonym file format)</p><p>ignoreCase=”true” (optional, instructs Lucene to ignore case when applying synonyms)</p><p>synonyms=”[path/to/your/synonyms.txt]” (replace with the actual path to your synonym file)</p><p><strong>4.3.4 Stopwords:</strong></p><p>Stopwords are very common words (e.g., “the”, “a”, “an”) that are often excluded from searches as they don’t significantly contribute to the meaning of a query. Removing stopwords reduces the index size and can improve search efficiency.</p><p>Similar to synonyms, AEM relies on an external stopword file for configuration. Here’s how to manage stopwords:</p><ul><li><strong>Create a Stopword File:</strong> Create a plain text file with the .txt extension. List each stopword you want to exclude on a separate line.</li></ul><p>Eg:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/0*NwfDCiom6QDjSlen" /></figure><ul><li><strong>Reference the Stopword File in the Index:</strong> Within the &lt;analyzers&gt; section and &lt;default&gt; analyzer of your AEM index configuration, locate the &lt;filters&gt; section. Add a &lt;Stop&gt; element with the following attribute:</li><li>words=”[path/to/your/stopwords.txt]” (replace with the actual path to your stopword file)</li></ul><p><strong>Sample Index Snippet:</strong></p><pre>```<br>&lt;filters&gt;<br>    &lt;Stop jcr:primaryType=&quot;nt:unstructured&quot; words=&quot;stopwords.txt&quot;&gt;<br>        &lt;stopwords.txt/&gt;<br>    &lt;/Stop&gt;<br>&lt;/filters&gt;<br>```</pre><p><strong>Important Considerations:</strong></p><ul><li>By default, AEM doesn’t include pre-configured synonym or stopword files. You’ll need to create and manage these files yourself based on your specific requirements.</li><li>Choosing the right stopwords depends on your content type and search needs. You might need to experiment to find the optimal balance between efficiency and comprehensiveness.</li><li>Overuse of synonyms can lead to irrelevant matches in searches. Ensure your synonym list is relevant and well-maintained.</li></ul><p>Hopefully this article has equipped you with the knowledge to optimize your AEM index management and deliver a superior search experience for your users.</p><p><strong>Happy searching! And stay tuned for the next article on ”Craft Compelling Search Results: Highlighting Keywords &amp; Controlled Excerpts “.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8c66b59c1ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-2-d8c66b59c1ef">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality : Part 2</a> was originally published in <a href="https://medium.com/activate-aem">Activate AEM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality- Part 1]]></title>
            <link>https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-1-effbbc4ab5e9?source=rss-860a4122753f------2</link>
            <guid isPermaLink="false">https://medium.com/p/effbbc4ab5e9</guid>
            <category><![CDATA[adobe-experience-manager]]></category>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[aem-developer]]></category>
            <category><![CDATA[lucene]]></category>
            <category><![CDATA[aem-architect]]></category>
            <dc:creator><![CDATA[Kiran Mayee N]]></dc:creator>
            <pubDate>Wed, 26 Jun 2024 05:11:30 GMT</pubDate>
            <atom:updated>2024-07-30T16:43:09.507Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Hey there, AEM users!</strong></p><p>Ever get frustrated when you can’t find what you’re looking for on your AEM site? You type in a search term, but nothing quite hits the mark. That’s where we come in — to supercharge your AEM search experience!</p><p>This series of blog posts is all about taking your AEM search to the next level. We’ll be exploring some cool features that will make finding content a breeze. Think real-time search suggestions as you type, lightning-fast results, and even highlighting keywords to pinpoint what you need in a flash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DrLtdSzGmGY5_yM8" /></figure><h3>First up: Search Suggestion Servlets!</h3><p>Imagine this: you’re typing a search query, and suggestions pop up instantly, guiding you towards the content you crave. That’s the magic of search suggestion servlets! They not only boost user engagement but also make finding information on your AEM site a walk in the park.</p><p><strong>But wait, there’s more!</strong></p><p>This series is just getting started. In the coming weeks, we’ll be diving into:</p><ul><li><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-2-d8c66b59c1ef"><strong>Optimizing Search with AEM Indexing Management</strong></a><strong>:</strong> How to keep your search results accurate and speedy, even with massive amounts of content.</li><li><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-3-dff0fa1a5e52"><strong>Craft Compelling Search Results: Highlighting Keywords &amp; Controlled Excerpts</strong></a><strong>:</strong> Making your search results super user-friendly by highlighting keywords and showing only the most relevant info.</li><li><strong>Empower User Searches: Synonyms, Filters &amp; Spell Check:</strong> Expanding search capabilities to include synonyms and filters, and helping users out with those pesky typos.</li></ul><p>So, stay tuned for some seriously awesome AEM search optimization tips!</p><p><strong>Behind the Magic: Search Suggestion Servlets</strong></p><p>Imagine typing a query into a search bar and getting helpful suggestions popping up as you type. That’s autocomplete in action — assisting users by predicting search terms, streamlining the search process, and improving efficiency. In the past, implementing autocomplete in AEM was a daunting task, requiring the indexing of every possible word combination, which was both cumbersome and resource-intensive. However, with the advent of AEM 6.1 and the Lucene Suggest module, a more optimized approach has emerged.</p><p>The Lucene Suggest module revolutionizes autocomplete by introducing a specialized data structure. This structure enables the engine to provide autocomplete and search suggestions without the need to index every conceivable word combination. Instead, Lucene efficiently loads completion values from indexed data using an analyzer called AnalyzingInfixSuggester. It then constructs an optimized in-memory structure for rapid query lookup, significantly enhancing performance and resource utilization.</p><p><strong>Implementation Steps:</strong></p><p>To implement autocomplete and search suggestions in AEM using Lucene, follow these steps:</p><ol><li>Define a Lucene index:</li></ol><ul><li>Create a custom Lucene index and specify the properties to be utilized for suggesting queries to users. For example, you can define an index named “testindex” and designate the “title” property for suggestion queries.</li><li>Referring to<a href="https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/indexing"> AEM Cloud Service Indexing Docs</a> can aid in adding, updating, or removing index definitions.</li></ul><p>2. Configure suggestion update frequency:</p><ul><li>Define the frequency at which indexed suggestions are updated by setting the property “suggestUpdateFrequencyMinutes.” This ensures that suggestions remain relevant and up-to-date, mitigating performance issues arising from frequent property updates.</li></ul><p>3. Enable compatVersion:</p><ul><li>Set the compatVersion of the index definition node to 2 to ensure compatibility with Lucene index usage for search suggestions.</li></ul><p>4. Execute suggestion queries:</p><ul><li>Utilize Lucene queries to retrieve suggestions based on user input. Path restrictions can be employed to filter search data and enhance query efficiency.</li></ul><p><strong>Query Examples:</strong></p><p>Below are examples of Lucene queries for retrieving search suggestions:</p><ul><li>Using index name:</li></ul><pre>SELECT [rep:suggest()] FROM [nt:unstructured] WHERE SUGGEST(&#39;aer&#39;) OPTION(INDEX NAME [testindex])</pre><ul><li>Applying path restriction:</li></ul><pre>SELECT [rep:suggest()] FROM [nt:unstructured] WHERE SUGGEST(&#39;aer&#39;) AND ISDESCENDANTNODE(&#39;/content/sampledata&#39;)</pre><p><strong>Sample Lucene Suggestion Index:</strong></p><p>Referencing the provided index structure, ensure that properties relevant to suggestion queries are appropriately configured for analysis and inclusion in suggestions.</p><pre>&lt;jcr:root xmlns:oak=&quot;http://jackrabbit.apache.org/oak/ns/1.0&quot; xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot;<br>    xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot; xmlns:rep=&quot;internal&quot;<br>    jcr:primaryType=&quot;oak:QueryIndexDefinition&quot;<br>    async=&quot;async&quot;<br>    codec=&quot;Lucene46&quot;<br>    compatVersion=&quot;{Long}2&quot;<br>    includePaths=&quot;[/content/kiran-sample/content/articles,/content/kiran-sample/blogs]&quot;<br>    indexPath=&quot;/oak:index/luceneSuggestion&quot;<br>    type=&quot;lucene&quot;&gt;<br>    &lt;indexRules jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>        &lt;nt:base<br>            jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>            &lt;properties jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>                &lt;title<br>                    jcr:primaryType=&quot;nt:unstructured&quot;<br>                    analyzed=&quot;{Boolean}true&quot;<br>                    name=&quot;title&quot;<br>                    ordered=&quot;{Boolean}false&quot;<br>                    propertyIndex=&quot;{Boolean}true&quot;<br>                    type=&quot;String&quot;<br>                    useInSuggest=&quot;{Boolean}true&quot; /&gt;<br>                &lt;summaryText<br>                    jcr:primaryType=&quot;nt:unstructured&quot;<br>                    analyzed=&quot;{Boolean}true&quot;<br>                    name=&quot;summaryText&quot;<br>                    ordered=&quot;{Boolean}false&quot;<br>                    propertyIndex=&quot;{Boolean}true&quot;<br>                    type=&quot;String&quot;<br>                    useInSuggest=&quot;{Boolean}true&quot; /&gt;<br>            &lt;/properties&gt;<br>        &lt;/nt:base&gt;<br>    &lt;/indexRules&gt;<br>    &lt;suggestion<br>        jcr:primaryType=&quot;nt:unstructured&quot;<br>        suggestUpdateFrequencyMinutes=&quot;{Long}30&quot;<br>        suggestAnalyzed=&quot;{Boolean}true&quot; /&gt;<br>    &lt;tika jcr:primaryType=&quot;nt:unstructured&quot;&gt;<br>        &lt;config.xml /&gt;<br>    &lt;/tika&gt;<br>&lt;/jcr:root&gt;</pre><p><strong>Search Suggestion Servlet:</strong></p><p>The SearchSuggestionServlet facilitates the retrieval of search suggestions based on user input. It interacts with the Lucene index and utilizes the SearchSuggestion interface for suggestion retrieval.</p><pre>import com.day.cq.search.suggest.Suggester;<br><br>// ... other imports<br><br>private Suggester suggester;<br><br>// ... other class members<br><br>public List&lt;String&gt; retrieveSuggestions(String searchTerm, int maxSuggestions, ResourceResolver resolver) {<br>    // ... rest of the logic<br><br>    // Fetch suggestions using the provided suggester<br>    for (final String suggestion : suggester.getSuggestions(session, “oak-nt:base”, searchTerm, enableSpellCheck)) {<br>        counter++;<br>        suggestionsList.add(suggestion);<br>        if (counter == maxSuggestions) {<br>            break;<br>        }<br>    }<br>    // ... rest of the logic<br>    return suggestionsList;<br>}</pre><p>Hitting this Servlet like below as the user keeps typing should provide the Suggestions based on the Properties analyzed as per the Index we defined earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wSwge3ERoFPsLum-" /></figure><p><strong>Happy searching! And stay tuned for the next article on “Optimizing Search with AEM Indexing Management”.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=effbbc4ab5e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/activate-aem/enhancing-aem-lucene-search-advanced-techniques-for-improved-search-functionality-part-1-effbbc4ab5e9">Enhancing AEM Lucene Search: Advanced Techniques for Improved Search Functionality- Part 1</a> was originally published in <a href="https://medium.com/activate-aem">Activate AEM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup XML Documentation (AEM Guides) for AEM]]></title>
            <link>https://medium.com/activate-aem/setup-aem-guides-2ba2dd334dfa?source=rss-860a4122753f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ba2dd334dfa</guid>
            <category><![CDATA[aem]]></category>
            <category><![CDATA[aem-guides]]></category>
            <category><![CDATA[aem-developer]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <category><![CDATA[dita]]></category>
            <dc:creator><![CDATA[Kiran Mayee N]]></dc:creator>
            <pubDate>Tue, 08 Aug 2023 14:01:51 GMT</pubDate>
            <atom:updated>2023-08-08T14:01:51.925Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Setup </strong>AEM Guides (<strong>XML Documentation for AEM)</strong></h3><p>Adobe Experience Manager (AEM) is a suite of software products from Adobe Systems that allows users to manage, create, deliver, and optimize digital experiences. AEM Guides is a new capability within AEM that allows creators to author, manage, and publish documentation and guides for products and services. In this blog post, we will cover the reasons to adopt AEM Guides for your documentation needs, the ways of configuring AEM Guides with AEM, and some of the Add-on customization possible. Furthermore, we will briefly cover working with dita files and publishing the output.</p><p>XML Documentation for Adobe Experience Manager / Experience Manager Guides, now referred to as AEM Guides is an application deployed on top of AEM. It enables native <em>Darwin Information Typing Architecture-based</em> (DITA) support in Experience Manager, allowing AEM to handle DITA-based content creation and delivery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZkgc9zT3R3O9Wnm1j9bUQ.png" /></figure><blockquote><em>REASONS TO ADOPT AEM GUIDES</em></blockquote><ol><li>AEM Guides is a powerful, enterprise-grade CCMS and therefore manages content at a granular level, unlike the document level. To maximize <em>content reuse</em>, it stores words, phrases, chapters, and sometimes even entire procedures in a central repository.</li><li>Maximizing content reuse means less original content needs to be translated. This strategy could save money on translations.</li><li>Imagine you have dozens of similar products that share the same content. Updating all related content for each product separately will be a huge task and may result in hundreds of errors. With DITA XML you can write the content in modules, that can then be plugged into wherever needed. Reusing content like this across publications in the organization can save a fortune and enhance consistency and high quality.</li><li>Each of the components is stored only once, which makes a trusted and consistent single source from which content material could be released across multiple platforms, for example: for print, mobile, or desktop.</li><li>It empowers authors to <em>create content using any offline DITA authoring tools</em> or an easy-to-use built-in web editor. (bonus tip below this 😉)</li><li><em>Single-click Publishing capability</em> generates DITA-based output in the most popular formats — Experience Manager Sites, PDF, HTML5, EPUB, and custom output through DITA-OT.</li><li><em>Localization Time and Costs</em> also reduce significantly</li><li>ensures uniformity and consistency in pre-and post-sales content while providing seamless and personalized experiences to end users.</li><li><em>Structured Content Management capabilities</em> like advanced content reuse, version management, reference management, search and metadata tags management, translation workflows and content health reports to assume complete control of your content.</li><li>Adds intrinsic intelligence to content using artificial intelligence and machine learning, powered by Adobe Sensei, for super-fast delivery and simpler content discovery by customers.</li><li>Saves time and effort through a <em>web-based review workflow</em>. Allows multiple authors and reviewers to collaborate simultaneously in real time even when operating remotely. Roles can be assigned using projects, and admin dashboards can be used to monitor progress.</li><li><em>Omnichannel content experiences</em> — Accelerate content velocity across touchpoints by easily delivering content to Adobe Experience Manager Sites, mobile apps, knowledge bases, CRM platforms, IoT Apps, chatbots, PDF, HTML5, EPUB, KINDLE, and more.</li><li>Can create granular, presentation-independent, variant-free content quickly and easily with the WYSIWYG web editor. The out-of-the-box ingestion framework helps to convert content from Word, XHTML, IDML, and other formats to DITA.</li></ol><p><strong><em>Bonus Tip:</em></strong> Offline DITA Authoring Tools that will ease content creation, click on them to know more.</p><blockquote><a href="https://www.adobe.com/products/framemaker.html">Adobe FrameMaker</a></blockquote><blockquote><a href="http://www.oxygenxml.com/">Oxygen XML</a></blockquote><blockquote><a href="http://www.xmetal.com/">XMetaL Author Enterprise</a></blockquote><blockquote><a href="https://www.madcapsoftware.com/products/flare/">Madcap Flare</a></blockquote><blockquote><a href="https://www.simplyxml.com/">Content Mapper</a></blockquote><blockquote><a href="https://heretto.com/">Heretto</a> (formerly Easy DITA)</blockquote><blockquote><a href="https://ditaexchange.com/">DITA Exchange</a></blockquote><blockquote><a href="https://www.ixiasoft.com/">IXIASOFT</a></blockquote><h3>WAYS OF CONFIGURING AEM GUIDES WITH AEM</h3><p>AEM Guides is a plug-in that installs on top of Adobe Experience Manager.</p><p>AEM Guides packages are available in two modes — <strong>UUID build</strong> and <strong>non-UUID build</strong>.</p><p>Customers will need to decide between UUID and non-UUID mode at the time of first setup. When upgrading from one version of AEM Guides to a newer version, customers will need to ensure they pick the same mode to match their existing mode. A non-UUID build should not be directly upgraded to a UUID build. Moving from a non-UUID build to UUID build would need content migration.</p><p>You can set up your AEM Guides with AEMaaCS as well as AMS or On-Prem.</p><p><strong>NOTE</strong></p><p>Reach out to your Customer Success Manager for access to AEM Guides builds for AEM as a Cloud Service.</p><p>Having said that, let’s see how to configure <strong>AEM Guides onto AMS or On-Prem</strong></p><h4>Prerequisites</h4><p><strong><em>Adobe Experience Manager</em></strong></p><p>• Version 6.5 Service Pack 12, 11, 10 or 9</p><p>IMPORTANT: For AEM Site output generation, your AEM’s publish instance must have Service Pack 12, 11, 10, or 9.</p><p><strong><em>Java Development Kit</em></strong></p><p>• Oracle SE 11 JRE 11.x</p><p>• Oracle SE 8 JRE 1.8.x</p><p><strong><em>Web browser</em></strong></p><p>• Google Chrome (preferred)</p><p><strong>Step 1</strong> — Install AEM 6.5 On premise version</p><p><strong>Step 2 </strong>— Run your instance server</p><p><strong>Step 3 </strong>— Now go to<a href="https://experience.adobe.com/#/downloads/content/software-distribution/en/aem.html?"> Adobe Software Distribution</a> and download the below packages AEM 6.5 On Premise.</p><ol><li>Latest<strong> Service Pack</strong> from <a href="https://experience.adobe.com/#/downloads/content/software-distribution/en/aem.html">AEM 6.5 Service Pack</a></li><li>Latest <strong>UUID / Non-UUID Release for XML Documentation for AEM 6.5 from </strong><a href="https://experience.adobe.com/#/downloads/content/software-distribution/en/aem.html?fulltext=uuid*&amp;2_group.propertyvalues.property=.%2Fjcr%3Acontent%2Fmetadata%2Fdc%3Aversion&amp;2_group.propertyvalues.operation=equals&amp;2_group.propertyvalues.0_values=target-version%3Aaem%2F6-5&amp;3_group.propertyvalues.property=.%2Fjcr%3Acontent%2Fmetadata%2Fdc%3AsoftwareType&amp;3_group.propertyvalues.operation=equals&amp;3_group.propertyvalues.0_values=software-type%3Afeature&amp;orderby=%40jcr%3Acontent%2Fjcr%3AlastModified&amp;orderby.sort=desc&amp;layout=list&amp;p.offset=0&amp;p.limit=5"><strong>UUID &amp; Non-UUID Release</strong></a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CFAfz8cAX607hcAC" /></figure><p><strong>Step 4 </strong>— Now get to the CRX<strong> </strong>package manager and install the above downloaded packages as per the below order.</p><ol><li>First install the <strong>Service Pack.</strong></li><li>Then install <strong>UUID / Non-UUID Release for XML Documentation for AEM 6.5.</strong></li></ol><p><strong>Setup 5</strong> — Now go to your AEM dashboard home page and from there you will be able to access <strong>XML Editor.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bPmog0bxC_AZE2fD" /></figure><p>Once you have installed AEM Guides, you need to verify whether the installation was successful or not.</p><p>Perform the following steps to verify the installation process:</p><p>1) Log into your AEM instance and navigate to the AEM Web Console Bundles page. To visit the bundles page, enter the following URL:</p><p>http://&lt;server name&gt;:&lt;port&gt;/system/console/bundles</p><p><em>A list of bundles is shown.</em></p><p>2) Filter the list of bundles by entering fmdita in the filtering textbox and pressing Enter. The list of bundles is filtered to show the bundles installed by AEM Guides.</p><p><em>If the installation was successful, then all installed bundles will have a Status of Active. If any of the bundles do not have an Active status, then check the AEM logs to troubleshoot the installation issue.</em></p><h4><strong>Configuring AEM Guides onto AEM as a Cloud Service</strong></h4><p>Firstly, have your AEMaaCS instance server up and running</p><p>The AEM Guides are made available through the GitHub repository. You can download the AEM Guides from the GitHub repository and install it.</p><p><strong><em>Deploy AEM Guides module</em></strong></p><p>You can start by deploying AEM Guides via the Cloud Manager. To deploy the module you can follow the instructions mentioned in <a href="https://experienceleague.adobe.com/docs/experience-manager-guides-learn/tutorials/release-info/release-notes/cloud-release-notes/deploy-xml-on-aemaacs.html">AEM Guides as a Cloud Service deployment</a>.</p><p><strong><em>Verify AEM Guides installation</em></strong></p><p>Once you have installed AEM Guides, you need to verify whether the installation was successful or not.</p><p>Perform the following steps to verify the installation:</p><p>1) Access the Developer Console of your Cloud Service.</p><p><em>For details on accessing the Developer Console, see </em><a href="https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/debugging/debugging-aem-as-a-cloud-service/developer-console.html"><em>Developer Console access</em></a><em> in AEM documentation.</em></p><p>2) Access the list of OSGi Bundles in AEM.</p><p><em>For details on accessing Bundles, see </em><a href="https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/debugging/debugging-aem-as-a-cloud-service/developer-console.html?lang=en#bundles"><em>Bundles</em></a><em> in AEM documentation.</em></p><p>3) Search for fmdita in the list of bundles and check its status.</p><p><em>The status should show Active for successfully deployed bundles. If any of the bundle does not have an Active status, then check the AEM logs to troubleshoot the installation issue.</em></p><p>For more <a href="https://helpx.adobe.com/content/dam/help/en/xml-documentation-solution/4-0/Adobe-Experience-Manager-Guides_User-Guide_EN.pdf">— </a>If you are new to XML Documentation, then you should go through the hands-on training for better understanding. Check out the link below for a video tutorial.</p><p><a href="https://experienceleague.adobe.com/docs/experience-manager-xml-documentation-learn/videos/getting-started/understanding-the-aem-user-interface.html?lang=en">XML Documentation video tutorial</a></p><h3>Customization features available in AEM Guides</h3><blockquote><strong>Use custom DITA-OT</strong></blockquote><p>The DITA Open Toolkit (DITA-OT) is a set of Java-based, open-source tools that provide processing for DITA maps and topic content. AEM Guides allow you to easily import and use custom DITA-OT plug-ins. Once imported, AEM Guides can be configured to use the custom DITA-OT plug-in to generate output in any format. At the time of generating the output, simply</p><p>select the DITA-OT option and the AEM Guides uses the custom DITA-OT plug-in to generate the required output.</p><blockquote><strong>DITA specialization</strong></blockquote><p>DITA specialization is the process of developing new DITA structures through the addition of fresh elements or the deletion of old ones. It is possible to create a new DITA element by taking an existing DITA element and modifying it according to your authoring needs. In essence, DITA specialization allows you to create customized information models that meet your business requirements while retaining the benefits of the existing DITA architecture.</p><blockquote><strong>Customize Web Editor</strong></blockquote><p>AEM Guides comes bundled with a powerful Web Editor that allows your authors to create and edit DITA documents. You can customize the Web Editor’s toolbar to add or remove any feature that you can access from the toolbar. Also, you can configure auto-savings of files, generating IDs for elements as they are inserted in your documents, and much more.</p><p>The following sections cover the features that you can customize in the Web Editor:</p><p>• Customize toolbar</p><p>• Configure file auto-save in the Web Editor</p><p>• Customize AEM’s default dictionary</p><p>• Auto-generate element IDs</p><p>• Configure allowed special characters</p><p>• Configure filters for file browse dialog</p><p>• Configure display of UUID-based links</p><blockquote><strong>Customize AEM Site output</strong></blockquote><p>The AEM Guides support creating outputs in the following formats:</p><p>• AEM Site • PDF • HTML5 • EPUB • Custom output through DITA-OT</p><p>For the AEM Site output, you can assign different design templates with different output tasks. These design templates can render the DITA content in different layouts.</p><p>For example, you could specify different design templates for internal and external audiences. You can also use customized DITA Open Toolkit (DITA-OT) plug-ins with the AEM Guides. You can upload these custom DITA-OT plug-ins to generate PDF output in a specific way.</p><p><em>And many more feature customizations are possible.</em></p><h3>WORKING WITH DITA FILES</h3><p>Before we start working with DITA XML, let&#39;s know what it actually means</p><p>DITA stands for “Darwin Information Typing Architecture.”</p><p>In retrospect, the “Darwin” word in the name makes perfect sense since it is based on inheritance. Child elements “evolve” from the parent elements and are based on them.</p><p>XML stands for “<a href="https://www.xml.com/pub/a/98/10/guide0.html">Extensible Markup Language</a>,” which is a system that uses tags to tell the computer what to do with the text. It has opening tags and closing tags surrounding the text</p><p>For example, the HTML tag &lt;h1&gt; tells the browser that the text should be a large heading, and the tag &lt;p&gt; tells it that the text should be a paragraph. There are similar tags in DITA that tell computers what the content is.</p><p>Building Blocks of DITA: DITA Topics</p><p>Since DITA is a topic-based authoring standard, the building block of any DITA file/project is ‘Topic’. We represent it with the tag &lt;topic&gt; in a DITA project.</p><p>In the words of ‘OASIS’ — What is a Topic?</p><p>“In DITA, a topic is the basic unit of authoring and reuse. All DITA topics have the same basic structure: a title and, optionally, a body of content. Topics can be generic or more specialized; specialized topics represent more specific information types or semantic roles, for example, &lt;concept&gt;, &lt;task&gt;, &lt;reference&gt;, or &lt;learningContent&gt;.”</p><p>We then combine different topics together to form a “map,” which we transform into different DITA output formats (e.g. HTML, PDF, etc) as per requirements.</p><p>What is a DITA Map?</p><p>A DITA map is a kind of XML file composed of references to individual topics. By using references to topics, the DITA map file pulls together the topics into a collection to form an entire document.</p><p>Various topic types can be used depending on the type of information being documented.</p><p>As part of the DITA architecture, there are four standard topic types:</p><ol><li><strong>Concept</strong> — contains background information that answers the question “Why?”</li><li><strong>Task</strong> — contains procedural information that addresses the question “How?”</li><li><strong>Reference</strong> — contains facts, frequently in a table, about a topic that answers the question “What?”</li><li><strong>Glossary entry</strong> — defines a single term and gives the meaning of it, answering the question “What does it mean?”</li></ol><p>Okay, that’s pretty much about DITA XML Topics &amp; MAP. Now, let’s jump into the XML Editor from the AEM Navigation page.</p><p>From the sidebar, you can choose from multiple views for the XML Editor to best suit your organizational needs. The default view displays your Favorites. You can further customize it with shortcuts as needed. Conversely, the Repository View displays a more traditional folder structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*k9I_5LcSnry_EmAM" /></figure><p>Viewing content in the Assets UI</p><p>You can perform additional actions with your content. One of these options is to view your file in the Assets UI.</p><p>Hover over a folder or topic in the Repository and select the ellipsis icon that displays.</p><h3>Creating a folder</h3><ol><li>Select the Repository icon to view your folders and files.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/0*lY6hbM-27NjPoXNG" /></figure><p>2. Select the + icon and Folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/0*CTerWZjCFACMQI9g" /></figure><ol><li>Give the folder a title.</li><li>Select Create.<br>You have created a new folder, which now displays in the Repository. This folder will be your home for all course content.</li></ol><h3>Creating a subfolder</h3><p>We can now create a folder inside your new folder to contain images or other content</p><ol><li>Hover over your new folder in the Repository and select the ellipsis icon that displays.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*cPhRWwlyLs0IM7D-" /></figure><p>The Options menu displays.</p><p>2. Select Create &gt; Folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OaLk_Ifnc3gpQKBT" /></figure><p>3. Give the subfolder a title (for example, “images”) and select <strong>Create</strong>.</p><h3>Creating and populating a new concept</h3><ol><li>Hover over your parent folder in the Repository and select the ellipsis icon.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*8JgOPgIGUMHwRs6y" /></figure><p>2. Select Create &gt; Topic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q6XiPeD-hFJ9nlSO" /></figure><p>The Create New Topic dialog displays.</p><p>3. From the Template dropdown menu in the dialog, select Concept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*PDlbYhGrOib3ENqz" /></figure><p>4. Give your concept a title and select Create.<br>The new concept is displayed in the editor, populated with its title.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*lGvq28aI2TGh9TkR" /></figure><p>5. Populate the concept by clicking on either the short description or paragraph and typing your content.</p><h3>Creating and structuring the content</h3><p>Once you determine the topic type that your DITA structure has to follow. You can create the topic DITA File and start typing the content into your dita file, as easily as you can type any word document in Author mode.</p><p>It supports the usage of Plain text, lists, Tabular Columns, Images, Multimedia, Cross-references, links, inserting reusable content, Special characters, inserting keywords, snippets, Enabling/ Disabling Track changes, Merge option, Version History, Version Labeling, Creating review tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V8BnfaMRplyqID6o" /></figure><p>The above is an example of a Concept dita with some text, a hyperlink to an external document and an unordered list in <strong>Author mode</strong>.</p><p>The dita format for it could be seen by switching to the <strong>Source mode</strong>, content can also be edited in the source mode too, by adding the appropriate tags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TIWV-COUNWPNRsZw" /></figure><p><strong>Preview mode</strong> gives us a preview of the document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l1fsywTZaQvHXrvs" /></figure><p>In Author mode, on the right trail, we can see the Content properties, File properties, Review feedback and comments, Tracked changes, and Schematron Validation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/0*TwBlVoiwTxU7YIku" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/0*eeQV8EjwRlCawnUj" /></figure><h3>Save and Save as New Version</h3><p>You can save your work at any time with Save or Save as New Version. Use Save to keep your changes, and use Save as New Version to create a new version of your topic with current changes.</p><p>Saving your work without versioning</p><ol><li>Select the <strong>Save</strong> icon.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/0*UTGejtTrcPig9YMF" /></figure><p>Saving as a new version</p><p>Select the <strong>Save as New Version</strong> icon on the right of the Save icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/0*_Oy7FwdwKqx2ItGK" /></figure><p>The Save as New Version dialog box displays.</p><p>In the Comments for new Version field, enter a brief but clear summary of changes.</p><p>In the Version Labels field, enter any relevant labels.<br>Labels allow you to specify the version you want to include when publishing.</p><p><strong>NOTE</strong></p><p>If your program is configured with predefined labels, you can select from these to ensure consistent labelling.</p><p>Select <strong>Save</strong>.<br>You have created a new version of your topic, and the version number is updated.</p><h3>Versioning Content</h3><p>Now, we can save this document as a new version with a version label. Eg: 1.0. Once you save your DITA File with a version label, it can be seen at the top-right corner of the editor.</p><p>And continue, editing to make further changes and save this as a new version, Eg: 2.0.</p><p>Now, if you click on version history on the toolbar. You will see a window that shows the two versions of your document along with the version label, version comments, document preview and an option to <em>revert the document</em> to a selected version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tz56j9Cdo-4KCsck" /></figure><p>The <em>merge</em> option in the toolbar, helps you to track changes from a selected version and revert to a selected version or merge two versions of a document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WEfnyAuWEX8Yvb5U" /></figure><h3>Uploading DITA Files into AEM</h3><p>DITA Content created using other offline DITA Authoring tools can also be imported into AEM as Assets.</p><p>Click on the ellipsis of the folder, where you want to import the Externally authored DITA files, and click on the Upload Assets Option. Choose the DITA Files you want to upload here and click on Upload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H_UpMHX10Wq78CzB" /></figure><h3>Creating a Map</h3><p>A map is an organizational tool that lets you add and organize information in a hierarchical structure.</p><p>To create a map, select the ellipsis icon on your desired folder. Select <strong>Create &gt; Map</strong>. The Create New Map dialog displays.</p><ol><li>In the Template field, select <strong>Bookmap</strong> from the drop-down menu and give your map a title.</li><li>Select Create.<br>Your map is created, and the left rail automatically changes from the Repository view to the <strong>Map view</strong>.</li></ol><h3>Insert map components</h3><ol><li>Select the pencil icon on the left rail.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/0*fDXPvy_pc1xVLvRV" /></figure><p>This is the Edit icon and allows you to open the map in the editor.</p><p>2. Switch back to the Repository view by selecting the Repository icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/0*2IK_S5BGk7uNvcGj" /></figure><p>3. Add a topic to the map by dragging and dropping it from the Repository into the map in the editor.<br>The line indicator shows you where your topic is placed.</p><p>4. Continue to add topics as needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_oq-4IJz-LdKkdxF" /></figure><p>The author and source mode works the same as the DITA Topic in DITA Map too. Clicking on the preview mode, enables you to see the full content that has been added to the Bookmap in the chapterwise order.</p><p>The toolbar of the DITA Map, has a few additional options to explore such as Insert before and after — to order the topic in the Map, Insert Elements, Insert Topic Reference, Insert Topic Group, Insert Chapter, Insert Key Definition, Insert Relationship Table, Insert Reusable Content, Refresh Navigation Title Attribute, Lock, Toggle Tag Views and other options same as DITA Topic.</p><h3>Publishing the Output</h3><p>Once you have a completed map, you can publish your content in multiple output formats.</p><p>In the repository, select the ellipsis icon on your map to open the Options menu, and then Open in Map Dashboard. The Map Dashboard opens in another tab.</p><p>In the Output Presets tab, select the output preset that you want. Eg: AEM Site and PDF.</p><p>Select <strong>Generate.</strong> Navigate to the Outputs page to view the status of your generated outputs.</p><p>A green circle indicates that the generation is complete.</p><p>A yellow circle indicates output generated with errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3cLt9PzP_ECdjn7e" /></figure><p>Clicking on the PDF, enables you to download the Generated PDF.</p><p>Clicking on the AEM Site, redirects you to the output site.</p><p>To view the error logs, you can click on the Corresponding Time and Date shown in the Generated At Column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AB8r1P5l6mHxz0R3" /></figure><h4>The AEM Site Output</h4><p>In the AEM site output, topics, lists, images, titles, tables, and other content created with the XML Editor are all automatically published to web-friendly content by AEM.</p><p>You can see subordinate topics in the table of contents as well as in the Related information section. These links can all be used to navigate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CHqA1d8XXelyAh7l" /></figure><p>Upon clicking any of these links, you can view it in the below format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*arPznP0wkBKGSkmx" /></figure><h4>The PDF Output</h4><p>The finished PDF document contains the default title of the map as the main title on the cover page. Chapter cover pages are styled with the chapter number, and contain links to the topics within.</p><p>To know more about Output Generation with AEM Guides, take a look at the below link <a href="https://experienceleague.adobe.com/docs/experience-manager-guides-learn/videos/output-generation/overview.html?lang=en">Output Generation with AEM Guides</a>.</p><p>AEM Guides are a great way to manage your AEM content. With a few simple configuration changes, you can easily customize AEM Guides to fit your needs. This will allow you to take advantage of the many features that AEM Guides has to offer, such as versioning, content reuse, web-based review workflow, omnichannel content experiences and much more.</p><p>Phew! That was a long blog indeed. And with that, we’ve reached the end of our AEM guides expedition!</p><p>Happy guiding, my fellow techies!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ba2dd334dfa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/activate-aem/setup-aem-guides-2ba2dd334dfa">Setup XML Documentation (AEM Guides) for AEM</a> was originally published in <a href="https://medium.com/activate-aem">Activate AEM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>