jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Papez (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JCR-3542) Failing FullTextSearchScoreImpl unit test with native sort activated
Date Mon, 25 Mar 2013 19:45:15 GMT

     [ https://issues.apache.org/jira/browse/JCR-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benjamin Papez updated JCR-3542:
--------------------------------

    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).

  was:
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

    
> Failing FullTextSearchScoreImpl unit test with native sort activated
> --------------------------------------------------------------------
>
>                 Key: JCR-3542
>                 URL: https://issues.apache.org/jira/browse/JCR-3542
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 2.4.3
>            Reporter: Benjamin Papez
>
> 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).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message