[ https://issues.apache.org/jira/browse/JCR-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Klimetschek resolved JCR-1945. ---------------------------------------- Resolution: Invalid My fault, the order by statement was wrong, it should have been: order by @jcr:score descending Now the result looks good. > Scoring of a rep:similar search is not as expected > -------------------------------------------------- > > Key: JCR-1945 > URL: https://issues.apache.org/jira/browse/JCR-1945 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core, query > Reporter: Alexander Klimetschek > Priority: Minor > > A normal rep:similar query, such as > //element(*, nt:hierarchyNode)[rep:similar(jcr:content, > '/content/some/path/jcr:content')] > will return a properly ordered result, with the most similar nodes at the > top. However, adding an order by @jcr:score > //element(*, nt:hierarchyNode)[rep:similar(jcr:content, > '/content/some/path/jcr:content')] order by @jcr:score desc > will return a list with not-so-well-matching nodes at the top. I think one > would expect the score value to depend on the similarity, ie. the more > similar, the higher the score, so the result should look just as the one > without an order by. > (tested only on a Jackrabbit 1.4.6) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.