FAQ
BitSet cannot be cast to DocIdSet
---------------------------------

Key: LUCENE-1432
URL: https://issues.apache.org/jira/browse/LUCENE-1432
Project: Lucene - Java
Issue Type: Bug
Components: Search
Affects Versions: 2.4
Reporter: Wouter Heijke


We recently upgraded from Lucene 2.3.1 to 2.4.0.
We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:

java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
org.apache.lucene.search.Searcher.search(Searcher.java:136)

Our index is 15gb in size and was made with Lucene 2.4.0.
The index holds around 36 million (Lucene) documents and 268 million terms.



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Search Discussions

  • Mark Harwood (JIRA) at Oct 30, 2008 at 12:02 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643947#action_12643947 ]

    Mark Harwood commented on LUCENE-1432:
    --------------------------------------

    Does your application code call the deprecated Filter.bits(reader) on the CachingWrapperFilter anywhere?
    This would cause CachingWrapperFilter to cache an old-style bitset but the standard Lucene search will subsequently call Filter.getDocIdSet(reader) which always expects a DocIdSet to have been cached.

    Ideally CachingWrapperFilter should be capable of recognising and adapting to this mix of filtering styles - at least while Lucene still maintains support for both Filter.getDocIdSet() AND Filter.bits().
    In the interim, try replace any application code that calls bits() with getDocIdSet() if possible.
    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke

    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Wouter Heijke (JIRA) at Oct 30, 2008 at 1:04 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643959#action_12643959 ]

    Wouter Heijke commented on LUCENE-1432:
    ---------------------------------------

    Yes, the application calls bits() somewhere. I had just changed bits() into getDocIdSet() before your comment so this was the right thing to do, at least to fix the problem for now. Thanks!
    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke

    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Paul Elschot (JIRA) at Oct 30, 2008 at 8:53 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Paul Elschot updated LUCENE-1432:
    ---------------------------------

    Attachment: LUCENE-1432.patch

    This patch should fix the problem.

    However, the implementation of the bits() method is so inefficient that it might actually motivate users to avoid it.

    The patch also contains a docIdSetToCache() method with the Filter and the IndexReader as arguments, as discussed at LUCENE-1296.
    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke
    Attachments: LUCENE-1432.patch


    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Paul Elschot (JIRA) at Oct 30, 2008 at 8:57 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644102#action_12644102 ]

    paul.elschot@xs4all.nl edited comment on LUCENE-1432 at 10/30/08 1:55 PM:
    ----------------------------------------------------------------

    This patch should fix the problem.

    However, the implementation of the bits() method is so inefficient that it might actually motivate users to avoid it.

    The patch also contains a docIdSetToCache() method with the DocIdSet and the IndexReader as arguments, as discussed at LUCENE-1296.

    was (Author: paul.elschot@xs4all.nl):
    This patch should fix the problem.

    However, the implementation of the bits() method is so inefficient that it might actually motivate users to avoid it.

    The patch also contains a docIdSetToCache() method with the Filter and the IndexReader as arguments, as discussed at LUCENE-1296.
    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke
    Attachments: LUCENE-1432.patch


    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Paul Elschot (JIRA) at Nov 21, 2008 at 9:28 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649801#action_12649801 ]

    Paul Elschot commented on LUCENE-1432:
    --------------------------------------

    I think this is a duplicate of LUCENE-1459, for which the better fix than the patch here was just committed.
    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke
    Attachments: LUCENE-1432.patch


    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Michael McCandless (JIRA) at Nov 21, 2008 at 9:34 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649805#action_12649805 ]

    Michael McCandless commented on LUCENE-1432:
    --------------------------------------------

    Whoa, you're right! I missed this dup.

    Though shouldn't we add the docIdSetToCache method?
    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke
    Attachments: LUCENE-1432.patch


    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Michael McCandless (JIRA) at Nov 21, 2008 at 9:34 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Michael McCandless reassigned LUCENE-1432:
    ------------------------------------------

    Assignee: Michael McCandless
    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke
    Assignee: Michael McCandless
    Attachments: LUCENE-1432.patch


    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Paul Elschot (JIRA) at Nov 21, 2008 at 9:44 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649807#action_12649807 ]

    Paul Elschot commented on LUCENE-1432:
    --------------------------------------

    {quote}Though shouldn't we add the docIdSetToCache method?{quote}
    Yep, likely conflict ahead here at the next svn up. Never mind, I'll leave the docIdSetToCache method in for LUCENE-1296 .

    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke
    Assignee: Michael McCandless
    Attachments: LUCENE-1432.patch


    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Michael McCandless (JIRA) at Nov 21, 2008 at 9:48 pm
    [ https://issues.apache.org/jira/browse/LUCENE-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Michael McCandless resolved LUCENE-1432.
    ----------------------------------------

    Resolution: Duplicate

    OK.

    Dup of LUCENE-1459.
    BitSet cannot be cast to DocIdSet
    ---------------------------------

    Key: LUCENE-1432
    URL: https://issues.apache.org/jira/browse/LUCENE-1432
    Project: Lucene - Java
    Issue Type: Bug
    Components: Search
    Affects Versions: 2.4
    Reporter: Wouter Heijke
    Assignee: Michael McCandless
    Attachments: LUCENE-1432.patch


    We recently upgraded from Lucene 2.3.1 to 2.4.0.
    We left the code as-is apart from the needed changes to the package name for snowball, everything seems to run as before... Until yesterday when we started noticing the following stacktrace:
    java.lang.ClassCastException: java.util.BitSet cannot be cast to org.apache.lucene.search.DocIdSet
    org.apache.lucene.search.CachingWrapperFilter.getDocIdSet(CachingWrapperFilter.java:76)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:200)
    org.apache.lucene.misc.ChainedFilter.getDocIdSet(ChainedFilter.java:145)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:140)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:112)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    Our index is 15gb in size and was made with Lucene 2.4.0.
    The index holds around 36 million (Lucene) documents and 268 million terms.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieslucene
postedOct 30, '08 at 11:42a
activeNov 21, '08 at 9:48p
posts10
users1
websitelucene.apache.org

1 user in discussion

Michael McCandless (JIRA): 10 posts

People

Translate

site design / logo © 2021 Grokbase