Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.7.1
-
None
Description
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.