[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-157?pag...
]
Stephane Epardaud commented on HSEARCH-157:
-------------------------------------------
Is it really the case?
I've had a hard time in HS 3.0.1 with FullTextQuery.getResultSize() because it returns
a size consistently greater than FullTextQuery.getResultList().size().
I've tried to fix it but I had no clue how.
Basically getResultList() returns 16 because hits.length() returns 16.
When I get in FullTextQueryImpl.list() at this line:
{code}
List list = loader.load( infos.toArray( new EntityInfo[infos.size()] ) );
{code}
infos.size() == 16, and the resulting list.size() == 15.
I've no idea why.
My index is up-to-date and optimised.
The correct result which I expect is indeed 15, so that 16 number is upsetting my views.
I am using a filter, if that matters, but I think it is applied in getHits().
In 3.0.1 the only thing cached by getHits() is hits.length() in resultSize, not the actual
result size as determined by getResultList().size().
Make explicit in FAQ and doc that query.list() followed by
query.getResultSize() triggers only one query
--------------------------------------------------------------------------------------------------------
Key: HSEARCH-157
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-157
Project: Hibernate Search
Issue Type: Improvement
Components: documentation
Reporter: Emmanuel Bernard
Priority: Minor
Fix For: 3.0.2.GA, 3.1.0
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira