[hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-325) org.hibernate.search.query.FullTextQueryImpl.iterate() ommit the last result.
Sanne Grinovero (JIRA)
noreply at atlassian.com
Sat Jan 31 03:38:39 EST 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanne Grinovero updated HSEARCH-325:
------------------------------------
Fix Version/s: 3.1.1
> org.hibernate.search.query.FullTextQueryImpl.iterate() ommit the last result.
> -----------------------------------------------------------------------------
>
> Key: HSEARCH-325
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-325
> Project: Hibernate Search
> Issue Type: Bug
> Components: query
> Affects Versions: 3.1.0.GA
> Reporter: Ivan Latysh
> Priority: Blocker
> Fix For: 3.1.1
>
>
> line 152 : int size = max - first + 1 < 0 ? 0 : max - first + 1;
> will produce wrong size, because max( first, queryHits.totalHits ) returns not the size of the selection but the max element index so for 3 hits max=2.
> And since first element is 1 and not 0 we have to account for it.
> Correct size calculation:
> line 152 : int size = max - first + 2 < 0 ? 0 : max - first + 2;
--
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