Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM 6.5 - Query Builder - Debugger - Show Score and Score Explanation?

JoeThePlumber
Level 1
Level 1

Using the AEM search (Query Builder/Oak/Lucene) to search for content (articles) based on one or more terms, I notice that the order I receive the results doesn't feel relevant. The order does not feel relevant because articles which have more content and more occurrences of the search terms show lower in the results order. I order my results by score in descending order (I believe that is the default sort order).

When debugging in IntelliJ and looking at the score value of each Hit via the getScore() method, I always receive a value of 0.01 which feels odd.

Example query:

1_group.1_fulltext=invoice
p.limit=100
path=/content/foo
type=cq:Page

Using a debugging tool like the "Query Builder Debugger" I would like to confirm that the score returned by the query really is 0.01. The "Query Builder Debugger" only shows the path in the results view. Is there another tool I can use to troubleshoot this problem ? How can I easily trouble shoot my problem by viewing the actual score returned by lucene ?

How can I maybe access lucene directly and do queries against it ?

How can I run the following type of query and see the result of it ?

select [oak:scoreExplanation], [jcr:path], [jcr:score], * from [cq:Page]

How do you show score on this page for example ? http://localhost:4502/bin/querybuilder.json?fulltext=Management&type=cq:Page&orderby=@jcr:score&orde...

 
1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor
4 Replies
JoeThePlumber
Level 1
Level 1

Thanks for your comment but this is just a tool to help you improve the performance of a query and unfortunately not the relevance. I am trying to confirm that the scoring functionality is enabled correctly. I have added a boost on the title field and it doesn't seem to work. I just want to see the score and better understand how it is calculated.

Arun_Patidar
Correct answer by
Community Advisor
Community Advisor
JoeThePlumber
Level 1
Level 1
Hello Arun, Thank you very much for the link and for trying to help. As a newbie, I am having a hard time understanding what crucial information I am supposed to get from that page you are referring to. Based on the info on that page how do I solve my problem ? This page at first glance feels pretty much useless to me 🙂