Jukka Zitting created JCR-3677:
----------------------------------

             Summary: Invalid SQL2OrderByTest.testOrderByScore test case
                 Key: JCR-3677
                 URL: https://issues.apache.org/jira/browse/JCR-3677
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 2.7.1
            Reporter: Jukka Zitting
            Priority: Minor


The SQL2OrderByTest.testOrderByScore test case makes a query like the following:

    SELECT * FROM [nt:base] WHERE ISCHILDNODE([/testroot])
    ORDER BY [jcr:score]

The test then expects that he matching nodes are returned in a specific order. 
This is wrong on two counts:

1) The score of a search result is defined only for full text queries. It is 
meaningless for other queries and undefined by the spec.

2) Even if the score was a defined for such queries, the SQL2 syntax for 
accessing it is "SCORE()", not "[jcr:score]".

Thus I suggest to either remove the test case or to make it use full text 
search and/or just verify that the results are ordered according to their 
scores instead of being in any specific predetermined order.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to