Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
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
8 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 2

Did you ever get a valid answer to this? I am having the same issue and the lack of documentation and support is maddening.

 

Avatar

Level 2

Hello Arun, I am having this same issue, but the link you provided is of no use. Can you provide any specifics on implementation and/or configuration that will enable one to view and retrieve a valid jcr:score value? Or perhaps explain what it means when the value is always 0.01?

The docs contain absolutely no useful information that would help a developer figure this out.

 

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 ?