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

Avatar

Avatar

JoeThePlumber

Avatar

JoeThePlumber

JoeThePlumber

19-10-2020

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...

 
lucene oak:index score

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

25-10-2020

Answers (1)

Answers (1)

Avatar

Avatar

Sandeep6

Avatar

Sandeep6

Sandeep6

20-10-2020

Hi @JoeThePlumber ,

 

Please try below url to troubleshoot the problem

http://localhost:4502/libs/granite/operations/content/diagnosistools/queryPerformance.html  

 

Thank,

Sandeep.