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?
Solved! Go to Solution.
Views
Replies
Total Likes
Here is an old community thread that may be helpful in checking the jcr:score value:
http://forums.adobe.com/thread/1168139
It talks about this:
" We are running a JCR SQL2 query to perform search over the content within pages. We have come across a clause "order by jcr:score" which I assume will be ordering the search results but I am not sure what is the ordering criteria"
Views
Replies
Total Likes
Here is an old community thread that may be helpful in checking the jcr:score value:
http://forums.adobe.com/thread/1168139
It talks about this:
" We are running a JCR SQL2 query to perform search over the content within pages. We have come across a clause "order by jcr:score" which I assume will be ordering the search results but I am not sure what is the ordering criteria"
Views
Replies
Total Likes
Hi,
The main issue which we are facing is that even after boosting the property "jcr:title" some pages with the title containing the search input term are still not coming in top.
So, I want to know
1. Whether the boosting works with my query properly or not?
2. Do we need to do some other indexing configurations to properly achieve the order?
Views
Replies
Total Likes
Karan,
Note that after changing indexing config you have to rebuild your index in oder for changes to get reflected.
Other way to boost on property would be doing OR search for property you want to boost on. For example search in title as well as your old search criteria, in that case if keyword is present in title that will come first.
Yogesh
Views
Replies
Total Likes
Hi Yogesh,
1. Yes, we re-built the indexes every time we change in the indexing configuration.
2. Are you suggesting to do a search on title and any other property with the full-text search. But for this case, we have to enter each and every property which can cause some relevancy issues.
But this should be the default scenario for any search term, if any keyword is present in the title, it should come first.
Karan
Views
Replies
Total Likes
Hey wondering where do I need to plug in the xml? or this is a representation of a node. The xml configuration update you have is exactly what I need
Views
Replies
Total Likes
Hi @aembytes
Were you able to figure out where to put this XML config?
This is exactly what I need.
I appreciate your help.
Thank you
Views
Replies
Total Likes