[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765946#comment-16765946 ]
Thomas Mueller commented on OAK-8035: ------------------------------------- There are some things I would change: * The declaration "IndexPlan almostBestPlan" doesn't belong there. Please move below the comment "track similar costs" and the related declarations. * Please fix the formatting in "String.format("selected index {%s} with plan [%s] and {%s} ...". The {} were needed for LOG.debug, they are not needed for String.format. Also, a space is missing before "have similar ". Regards, Thomas > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > ---------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query > Reporter: Nitin Gupta > Assignee: Nitin Gupta > Priority: Major > Attachments: OAK-8035.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)