You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shuji Umino (JIRA)" <ji...@apache.org> on 2011/09/22 08:23:26 UTC

[jira] [Created] (LUCENE-3446) NullPointerException in BooleanFilter

NullPointerException in BooleanFilter 
--------------------------------------

                 Key: LUCENE-3446
                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
             Project: Lucene - Java
          Issue Type: Bug
          Components: modules/other
    Affects Versions: 3.4
            Reporter: Shuji Umino
            Priority: Minor


BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
if any QueryWrapperFilter not match terms in IndexReader.

---------------------------------------------------
java.lang.NullPointerException
	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
---------------------------------------------------

null-check below lines.
---------------------------------------------------
res.inPlaceOr(getDISI(shouldFilters, i, reader));
res.inPlaceNot(getDISI(notFilters, i, reader));
res.inPlaceAnd(getDISI(mustFilters, i, reader));
---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (LUCENE-3446) NullPointerException in BooleanFilter

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler resolved LUCENE-3446.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.5

Backported to 3.x branch revision: 1174418

> NullPointerException in BooleanFilter 
> --------------------------------------
>
>                 Key: LUCENE-3446
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.4
>            Reporter: Shuji Umino
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.5, 4.0
>
>         Attachments: LUCENE-3446.patch, LUCENE-3446.patch, LUCENE-3446.patch
>
>
> BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
> if any QueryWrapperFilter not match terms in IndexReader.
> ---------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
> 	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
> 	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
> 	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
> ---------------------------------------------------
> null-check below lines.
> ---------------------------------------------------
> res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
> res.inPlaceOr(getDISI(shouldFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
> res.inPlaceNot(getDISI(notFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
> res.inPlaceAnd(getDISI(mustFilters, i, reader));
> ---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Assigned] (LUCENE-3446) NullPointerException in BooleanFilter

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler reassigned LUCENE-3446:
-------------------------------------

    Assignee: Uwe Schindler

> NullPointerException in BooleanFilter 
> --------------------------------------
>
>                 Key: LUCENE-3446
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.4
>            Reporter: Shuji Umino
>            Assignee: Uwe Schindler
>            Priority: Minor
>
> BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
> if any QueryWrapperFilter not match terms in IndexReader.
> ---------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
> 	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
> 	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
> 	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
> ---------------------------------------------------
> null-check below lines.
> ---------------------------------------------------
> res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
> res.inPlaceOr(getDISI(shouldFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
> res.inPlaceNot(getDISI(notFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
> res.inPlaceAnd(getDISI(mustFilters, i, reader));
> ---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3446) NullPointerException in BooleanFilter

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-3446:
----------------------------------

    Attachment: LUCENE-3446.patch

Patch update.

> NullPointerException in BooleanFilter 
> --------------------------------------
>
>                 Key: LUCENE-3446
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.4
>            Reporter: Shuji Umino
>            Assignee: Uwe Schindler
>            Priority: Minor
>         Attachments: LUCENE-3446.patch, LUCENE-3446.patch, LUCENE-3446.patch
>
>
> BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
> if any QueryWrapperFilter not match terms in IndexReader.
> ---------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
> 	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
> 	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
> 	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
> ---------------------------------------------------
> null-check below lines.
> ---------------------------------------------------
> res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
> res.inPlaceOr(getDISI(shouldFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
> res.inPlaceNot(getDISI(notFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
> res.inPlaceAnd(getDISI(mustFilters, i, reader));
> ---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3446) NullPointerException in BooleanFilter

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112408#comment-13112408 ] 

Uwe Schindler commented on LUCENE-3446:
---------------------------------------

Thanks for reporting this bug. Indeed, getDocIdSet() and DISI.getDocIdSetIterator() can return null, if no documents match. BooleanFilter must respect this.

I will take care.

> NullPointerException in BooleanFilter 
> --------------------------------------
>
>                 Key: LUCENE-3446
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.4
>            Reporter: Shuji Umino
>            Assignee: Uwe Schindler
>            Priority: Minor
>
> BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
> if any QueryWrapperFilter not match terms in IndexReader.
> ---------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
> 	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
> 	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
> 	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
> ---------------------------------------------------
> null-check below lines.
> ---------------------------------------------------
> res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
> res.inPlaceOr(getDISI(shouldFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
> res.inPlaceNot(getDISI(notFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
> res.inPlaceAnd(getDISI(mustFilters, i, reader));
> ---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3446) NullPointerException in BooleanFilter

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-3446:
----------------------------------

    Attachment: LUCENE-3446.patch

Patch for trunk.

This patch handles filters returning null DocIdSet and also those returning null DISIs (like QueryWrapperFilter when scorer==null). I also added tests for all combinations.

This patch also optimized the filter building, as getDocIdSet is not called unnecessarily twice (which is expensive for lots of filters).

I added a TODO: The Filter uses OpenBitSet and has optimizations for OpenBitSets that no longer apply to Lucene core's filters: Core filters mostly return FixedBitSet now. A move to FixedBitSet for BooleanFilter is not possible at the moment, as and() and andNot() are missing in this class.

> NullPointerException in BooleanFilter 
> --------------------------------------
>
>                 Key: LUCENE-3446
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.4
>            Reporter: Shuji Umino
>            Assignee: Uwe Schindler
>            Priority: Minor
>         Attachments: LUCENE-3446.patch
>
>
> BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
> if any QueryWrapperFilter not match terms in IndexReader.
> ---------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
> 	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
> 	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
> 	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
> ---------------------------------------------------
> null-check below lines.
> ---------------------------------------------------
> res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
> res.inPlaceOr(getDISI(shouldFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
> res.inPlaceNot(getDISI(notFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
> res.inPlaceAnd(getDISI(mustFilters, i, reader));
> ---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3446) NullPointerException in BooleanFilter

Posted by "Shuji Umino (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shuji Umino updated LUCENE-3446:
--------------------------------

    Description: 
BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
if any QueryWrapperFilter not match terms in IndexReader.

---------------------------------------------------
java.lang.NullPointerException
	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
---------------------------------------------------

null-check below lines.
---------------------------------------------------
res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
res.inPlaceOr(getDISI(shouldFilters, i, reader));
res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
res.inPlaceNot(getDISI(notFilters, i, reader));
res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
res.inPlaceAnd(getDISI(mustFilters, i, reader));
---------------------------------------------------

  was:
BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
if any QueryWrapperFilter not match terms in IndexReader.

---------------------------------------------------
java.lang.NullPointerException
	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
---------------------------------------------------

null-check below lines.
---------------------------------------------------
res.inPlaceOr(getDISI(shouldFilters, i, reader));
res.inPlaceNot(getDISI(notFilters, i, reader));
res.inPlaceAnd(getDISI(mustFilters, i, reader));
---------------------------------------------------


> NullPointerException in BooleanFilter 
> --------------------------------------
>
>                 Key: LUCENE-3446
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.4
>            Reporter: Shuji Umino
>            Priority: Minor
>
> BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
> if any QueryWrapperFilter not match terms in IndexReader.
> ---------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
> 	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
> 	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
> 	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
> ---------------------------------------------------
> null-check below lines.
> ---------------------------------------------------
> res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
> res.inPlaceOr(getDISI(shouldFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
> res.inPlaceNot(getDISI(notFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
> res.inPlaceAnd(getDISI(mustFilters, i, reader));
> ---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3446) NullPointerException in BooleanFilter

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-3446:
----------------------------------

    Attachment: LUCENE-3446.patch

Patch (contains LUCENE-3448) using FixedBitSets new methods. OpenBitSetDISI no longer needed.

> NullPointerException in BooleanFilter 
> --------------------------------------
>
>                 Key: LUCENE-3446
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.4
>            Reporter: Shuji Umino
>            Assignee: Uwe Schindler
>            Priority: Minor
>         Attachments: LUCENE-3446.patch, LUCENE-3446.patch
>
>
> BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
> if any QueryWrapperFilter not match terms in IndexReader.
> ---------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
> 	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
> 	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
> 	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
> ---------------------------------------------------
> null-check below lines.
> ---------------------------------------------------
> res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
> res.inPlaceOr(getDISI(shouldFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
> res.inPlaceNot(getDISI(notFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
> res.inPlaceAnd(getDISI(mustFilters, i, reader));
> ---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3446) NullPointerException in BooleanFilter

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112897#comment-13112897 ] 

Uwe Schindler commented on LUCENE-3446:
---------------------------------------

Committed trunk revision: 1174380

> NullPointerException in BooleanFilter 
> --------------------------------------
>
>                 Key: LUCENE-3446
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3446
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 3.4
>            Reporter: Shuji Umino
>            Assignee: Uwe Schindler
>            Priority: Minor
>         Attachments: LUCENE-3446.patch, LUCENE-3446.patch, LUCENE-3446.patch
>
>
> BooleanFilter getDISI() method used with QueryWrapperFilter occur NullPointerException,
> if any QueryWrapperFilter not match terms in IndexReader.
> ---------------------------------------------------
> java.lang.NullPointerException
> 	at org.apache.lucene.util.OpenBitSetDISI.inPlaceAnd(OpenBitSetDISI.java:66)
> 	at org.apache.lucene.search.BooleanFilter.getDocIdSet(BooleanFilter.java:102)
> 	at org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:551)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:532)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:463)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:433)
> 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:356)
> 	at test.BooleanFilterTest.main(BooleanFilterTest.java:50)
> ---------------------------------------------------
> null-check below lines.
> ---------------------------------------------------
> res = new OpenBitSetDISI(getDISI(shouldFilters, i, reader), reader.maxDoc());
> res.inPlaceOr(getDISI(shouldFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(notFilters, i, reader), reader.maxDoc());
> res.inPlaceNot(getDISI(notFilters, i, reader));
> res = new OpenBitSetDISI(getDISI(mustFilters, i, reader), reader.maxDoc());
> res.inPlaceAnd(getDISI(mustFilters, i, reader));
> ---------------------------------------------------

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org