com.atlassian.confluence.search.lucene.filter
Class MultiTermFilter
java.lang.Object
org.apache.lucene.search.Filter
com.atlassian.confluence.search.lucene.filter.MultiTermFilter
public class MultiTermFilter
- extends org.apache.lucene.search.Filter
Lucene filter that finds documents that match any of the supplied Term
. (This filter
basically applies an OR operation on each of the terms.)
Constructor Summary |
MultiTermFilter()
Create a new MultiTermFilter with a default behaviour of not negating. |
MultiTermFilter(boolean negating)
Create a new MultiTermFilter with control over whether it is negating or not. |
Method Summary |
void |
addTerm(org.apache.lucene.index.Term term)
|
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 |
MultiTermFilter
public MultiTermFilter()
- Create a new MultiTermFilter with a default behaviour of not negating.
- See Also:
MultiTermFilter(boolean)
MultiTermFilter
public MultiTermFilter(boolean negating)
- Create a new MultiTermFilter with control over whether it is negating or not.
- Parameters:
negating
- if true then the filter will have a starting state of allowing all documents with any matching
terms causing that document not to match. If false, then the filter behaves as you would normally
expect with no documents being allowed unless they match the filter.
addTerm
public void addTerm(org.apache.lucene.index.Term term)
- Parameters:
term
- one of the terms to be part of the filter.
- Throws:
java.lang.IllegalArgumentException
- if the null term parameter is supplied
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.