<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Searching in specific order in Adobe Experience Manager Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/421052#M119901</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="9759317"&gt;&lt;/LI-USER&gt;&lt;/P&gt;&lt;P&gt;In order for URL to be first in the Search Results, we need to boost &lt;EM&gt;&lt;STRONG&gt;nodeName&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;in the respective index (that is used for fulltext query execution)&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;For a full text query like below, &lt;EM&gt;&lt;STRONG&gt;cqPageLucene&lt;/STRONG&gt; &lt;/EM&gt;is used.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;path=/content/we-retail
fulltext=Skitouring
type=cq:Page
p.limit=-1&lt;/PRE&gt;&lt;P&gt;In order to have URLs that contain &lt;EM&gt;Skitouring&lt;/EM&gt; to be rendered first than the jcr:title for instance,&amp;nbsp; update the cqPageLucene as below and reindex.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_0-1630434346873.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/33919i3AA991AF08811DDA/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_0-1630434346873.png" alt="Vijayalakshmi_S_0-1630434346873.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_1-1630434408271.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/33920iE3B75A73F9423A81/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_1-1630434408271.png" alt="Vijayalakshmi_S_1-1630434408271.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Explain Query response:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_2-1630434540278.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/33921i68D5FF0A27E29EB7/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_2-1630434540278.png" alt="Vijayalakshmi_S_2-1630434540278.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query Results:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Just for a cross check I have amended the title of "Experience" page to Skitouring (which we see as a result in 4th entry)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_3-1630434628507.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/33922iCFCDE20693A57D77/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_3-1630434628507.png" alt="Vijayalakshmi_S_3-1630434628507.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggest to check which index is used for your fulltext query execution(as evident by Explain Query) and boost nodeName and other properties of that index accordingly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt; Per official doc, &lt;EM&gt;boost&lt;/EM&gt; should be of type "Double". &lt;FONT size="2"&gt;(Screenshots from my local is when I used&amp;nbsp;&lt;EM&gt;String&lt;/EM&gt;&amp;nbsp;and it works too)&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Aug 2021 21:49:08 GMT</pubDate>
    <dc:creator>Vijayalakshmi_S</dc:creator>
    <dc:date>2021-08-31T21:49:08Z</dc:date>
    <item>
      <title>Searching in specific order</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/420993#M119882</link>
      <description>&lt;P&gt;We want our results from content to be returned in this order&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;URL contains &amp;lt;keyword/&amp;gt;&lt;/LI&gt;&lt;LI&gt;Page title contains &amp;lt;keyword/&amp;gt;&lt;/LI&gt;&lt;LI&gt;Tags contain &amp;lt;keyword/&amp;gt;&lt;/LI&gt;&lt;LI&gt;Page Description (will crawl all source metadata) &amp;nbsp;contains &amp;lt;keyword/&amp;gt;&lt;/LI&gt;&lt;LI&gt;Boost frequency &amp;lt;keyword/&amp;gt; to the top&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how should we go about ensuring URL is included as first search criteria?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 14:13:17 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/420993#M119882</guid>
      <dc:creator>aembytes</dc:creator>
      <dc:date>2021-08-31T14:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Searching in specific order</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/420999#M119885</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="9759317"&gt;&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create custom predicates for that. You can use orderBy predicate with desired property and can join the results. Also, you can boost a specific property and give desired value to have order in place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-fulltext-search-result-order/td-p/320837" target="_blank"&gt;https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-fulltext-search-result-order/td-p/320837&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md" target="_blank"&gt;https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 15:07:44 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/420999#M119885</guid>
      <dc:creator>Ritesh_Mittal</dc:creator>
      <dc:date>2021-08-31T15:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Searching in specific order</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/421052#M119901</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="9759317"&gt;&lt;/LI-USER&gt;&lt;/P&gt;&lt;P&gt;In order for URL to be first in the Search Results, we need to boost &lt;EM&gt;&lt;STRONG&gt;nodeName&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;in the respective index (that is used for fulltext query execution)&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;For a full text query like below, &lt;EM&gt;&lt;STRONG&gt;cqPageLucene&lt;/STRONG&gt; &lt;/EM&gt;is used.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;path=/content/we-retail
fulltext=Skitouring
type=cq:Page
p.limit=-1&lt;/PRE&gt;&lt;P&gt;In order to have URLs that contain &lt;EM&gt;Skitouring&lt;/EM&gt; to be rendered first than the jcr:title for instance,&amp;nbsp; update the cqPageLucene as below and reindex.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_0-1630434346873.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/33919i3AA991AF08811DDA/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_0-1630434346873.png" alt="Vijayalakshmi_S_0-1630434346873.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_1-1630434408271.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/33920iE3B75A73F9423A81/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_1-1630434408271.png" alt="Vijayalakshmi_S_1-1630434408271.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Explain Query response:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_2-1630434540278.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/33921i68D5FF0A27E29EB7/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_2-1630434540278.png" alt="Vijayalakshmi_S_2-1630434540278.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query Results:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Just for a cross check I have amended the title of "Experience" page to Skitouring (which we see as a result in 4th entry)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_3-1630434628507.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/33922iCFCDE20693A57D77/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_3-1630434628507.png" alt="Vijayalakshmi_S_3-1630434628507.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggest to check which index is used for your fulltext query execution(as evident by Explain Query) and boost nodeName and other properties of that index accordingly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt; Per official doc, &lt;EM&gt;boost&lt;/EM&gt; should be of type "Double". &lt;FONT size="2"&gt;(Screenshots from my local is when I used&amp;nbsp;&lt;EM&gt;String&lt;/EM&gt;&amp;nbsp;and it works too)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 21:49:08 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/421052#M119901</guid>
      <dc:creator>Vijayalakshmi_S</dc:creator>
      <dc:date>2021-08-31T21:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Searching in specific order</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/421661#M120061</link>
      <description>&lt;P&gt;One additional query, what you mentioned worked, so that's awesome. If I had to put a page with the highest occurrence of search word on the top, would that be OOB behavior in jcr:score ordering or I'll have to do that additionally with a different attribute etc?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Sep 2021 15:21:51 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/421661#M120061</guid>
      <dc:creator>aembytes</dc:creator>
      <dc:date>2021-09-05T15:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Searching in specific order</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/421689#M120074</link>
      <description>&lt;P&gt;Thanks for the confirmation&amp;nbsp;&lt;LI-USER uid="9759317"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It happens OOTB.&amp;nbsp;&lt;SPAN&gt;For fulltext index, search results are sorted by jcr:score descending&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="2"&gt;(result with highest score being the first)&lt;/FONT&gt;&lt;SPAN&gt; by default.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If you would like to cross check this, you can print the jcr:score as part of query results and observe the behaviour.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using the same example :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;select [jcr:path], [jcr:score] from [cq:Page] as a where contains(*, 'Skitouring') and isdescendantnode(a, '/content/we-retail')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;results are returned with highest score being the top.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;experience page has the term "Skitouring" only in jcr:title and hence the least score.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vijayalakshmi_S_0-1630891841762.png" style="width: 999px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/34087i81573C3ADA161738/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Vijayalakshmi_S_0-1630891841762.png" alt="Vijayalakshmi_S_0-1630891841762.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Only thing to note is that if you have &lt;STRONG&gt;union of fulltext queries&lt;/STRONG&gt;, scoring is applied for each subquery individually and hence the ultimate result won't be ordered by score in this case.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 01:36:16 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/searching-in-specific-order/m-p/421689#M120074</guid>
      <dc:creator>Vijayalakshmi_S</dc:creator>
      <dc:date>2021-09-06T01:36:16Z</dc:date>
    </item>
  </channel>
</rss>

