[ 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to