[hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-545) Unable to project FullTextQuery.SCORE when using a custom Sort

Hardy Ferentschik (JIRA) noreply at atlassian.com
Thu Jun 17 05:29:21 EDT 2010


Unable to project FullTextQuery.SCORE when using a custom Sort
--------------------------------------------------------------

                 Key: HSEARCH-545
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-545
             Project: Hibernate Search
          Issue Type: Bug
          Components: engine
    Affects Versions: 3.2.0.Final
            Reporter: Hardy Ferentschik
             Fix For: 3.3.0


Due to [changes in Lucene|http://lucene.apache.org/java/2_9_0/changes/Changes.html#2.9.0.changes_in_backwards_compatibility_policy] regarding the calculation of the score projections of {{FullTextQuery.SCORE}} return NaN when a custom sort is used. 
IndexSearcher javadoc:
{quote}
By default, no scores are computed when sorting by field (using Searcher.search(Query,Filter,int,Sort)). You can change that, per IndexSearcher instance, by calling IndexSearcher.setDefaultFieldSortScoring
{quote}
See also [Search forum thread|https://forum.hibernate.org/viewtopic.php?f=9&t=1005262]

Without custom sort projecting on {{FullTextQuery.SCORE}} works as {{ProjectionQueryTest}} shows.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list