Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3542

Failing FullTextSearchScoreImpl unit test with native sort activated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4.3
    • None
    • query
    • 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).

      Attachments

        Activity

          People

            Unassigned Unassigned
            bpapez Benjamin Papez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: