Search Ordering by jcr:score
Hi,
We have implemented end-user search using default CQ Query Builder search but facing some issues with the ordering of the results.
We have also applied some configurations to boost the relevancy of any property.
Sample Query:
/jcr:root/content//element(*, nt:base)[jcr:contains(., 'Input Term*') and (@jcr:primaryType = 'dam:Asset' or @jcr:primaryType = 'cq:Page')] order by @jcr:score descending
Boost in Indexing Configuration:
<index-rule nodeType="cq:PageContent">
<property boost="100">jcr:title</property>
<property boost="50">cq:tags</property>
<property boost="10">jcr:description</property>
<property boost="1">jcr:created</property>
<property boost="1">publishdate</property>
<property boost="1">jcr:primaryType</property>
<property isRegexp="true">.*</property>
<property isRegexp="true">.*:.*</property>
</index-rule>
<index-rule nodeType="nt:unstructured">
<property boost="100">dam:WebLinkName</property>
<property boost="100">dc:title</property>
<property boost="50">cq:tags</property>
<property boost="10">dc:description</property>
<property boost="1">dc:uuid</property>
<property isRegexp="true">.*</property>
<property isRegexp="true">.*:.*</property>
</index-rule>
When we search for any keyword then we have seen that some of the pages come last in the list even if the keyword presents inside the title of that particular page.
I have also read in one of the articles on Adobe (How to use 'Boosts' at Indexing Time and at Query Runtime) that boosting works only if we search on specific property.
Please provide some insights on this issue.
Can I get the value of jcr:score from somewhere to check the ordering?