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