Add better exception handling for FulltextQueryImpl.calculateTopDocsRetrievalSize()
-----------------------------------------------------------------------------------
Key: HSEARCH-604
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-604
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.3.0.Beta1
Reporter: Hardy Ferentschik
Fix For: 3.3.0.Beta2
Having a page offset of {{0}} and a page size of {{0}} (arguably a bad combination) you
get a
{code}
java.lang.IllegalArgumentException: nDocs must be > 0
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:169)
at org.apache.lucene.search.Searcher.search(Searcher.java:181)
{code}
We should improve the code and error handling. With a page size of {{0}} we can return
just the empty list.
See also -
https://forum.hibernate.org/viewtopic.php?f=9&t=994710
--
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