]
Hardy Ferentschik resolved HSEARCH-741.
---------------------------------------
Resolution: Fixed
NPE using two fulltext filters, one of them matching nothing (some
filters only)
--------------------------------------------------------------------------------
Key: HSEARCH-741
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-741
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.1.0.GA, 3.1.1.GA, 3.2.0.Final, 3.2.1, 3.3.0.Final, 3.4.0.Final
Reporter: Sanne Grinovero
Assignee: Sanne Grinovero
Fix For: 3.5
It seems that some filter implementations are allowed to return null instead of an empty
iterator if they don't match any document.
In this case if multiple filters are enabled, and they are eligible for bitset merging,
and no matches where found, we get:
{code}java.lang.NullPointerException
org.hibernate.search.filter.AndDocIdSet.findFirstTargetPosition(AndDocIdSet.java:144)
org.hibernate.search.filter.AndDocIdSet.makeDocIdSetOnAgreedBits(AndDocIdSet.java:89)
org.hibernate.search.filter.AndDocIdSet.buildBitSet(AndDocIdSet.java:81)
org.hibernate.search.filter.AndDocIdSet.iterator(AndDocIdSet.java:60)
org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:550)
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:525)
org.hibernate.search.query.engine.impl.QueryHits.updateTopDocs(QueryHits.java:219)
org.hibernate.search.query.engine.impl.QueryHits.<init>(QueryHits.java:127)
org.hibernate.search.query.engine.impl.HSQueryImpl.getQueryHits(HSQueryImpl.java:419)
org.hibernate.search.query.engine.impl.HSQueryImpl.queryEntityInfos(HSQueryImpl.java:222)
org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:206)
com.example.dao.impl.DaoImpl.search(Unknown Source)
....{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: