com.atlassian.confluence.search.lucene.filter
Class AcceptLiveDocsFilter
java.lang.Object
org.apache.lucene.search.Filter
com.atlassian.confluence.search.lucene.filter.AcceptLiveDocsFilter
public class AcceptLiveDocsFilter
- extends org.apache.lucene.search.Filter
Wraps a delegate Filter and ensures that only live (non-deleted) docs are accepted through this filter.
This should typically be applied over the filter that we plan to search with as a catch-all.
Ideally, all clients implementing a filter would follow the best practice of wrapping their DocIdSets in a call to
BitsFilteredDocIdSet.wrap(org.apache.lucene.search.DocIdSet, org.apache.lucene.util.Bits)
. However, we cannot
enforce this.
Method Summary |
org.apache.lucene.search.DocIdSet |
getDocIdSet(org.apache.lucene.index.AtomicReaderContext context,
org.apache.lucene.util.Bits acceptDocs)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AcceptLiveDocsFilter
public AcceptLiveDocsFilter(org.apache.lucene.search.Filter delegate)
getDocIdSet
public org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.AtomicReaderContext context,
org.apache.lucene.util.Bits acceptDocs)
throws java.io.IOException
- Specified by:
getDocIdSet
in class org.apache.lucene.search.Filter
- Throws:
java.io.IOException
Copyright © 2003-2014 Atlassian. All Rights Reserved.