Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

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

Avatar

Correct answer by
Community Advisor
6 Replies

Avatar

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.

Avatar

Correct answer by
Community Advisor

Avatar

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

Avatar

Level 1

hello @JoeThePlumber, i'm facing a similar issue. did you figure out why the search algorithm returns the same score of 0.01 ?