Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.4.3
-
None
-
None
Description
When switching on native sort, the FullTextSearchScoreImpl unit test starts to fail now and then.#
The problem seems to be in: QueryEngine.createSortFields in
if (JcrConstants.JCR_SCORE.equals(p)) {
sortFields.add(new SortField(null, SortField.SCORE, !isAsc));
here the order by function in the query is: SCORE(s) and not jcr:score, so the check needs to be changed.
Furthermore I think the parameter passed into SortField should be isAsc and not its negation: !isAcs . If isAsc is true, then reverse in Lucene should be true, because score ascending in JCR spec means score descending in Lucene (see comment before the mentioned lines).