[hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-741) NPE using two fulltext filters, one of them matching nothing (some filters only)

Sanne Grinovero (JIRA) noreply at atlassian.com
Tue May 17 10:39:25 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanne Grinovero updated HSEARCH-741:
------------------------------------

    Fix Version/s:     (was: 4.0)
                   4.0.0.Alpha1

> 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: 4.0.0.Alpha1
>
>
> 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: 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