com.atlassian.confluence.search.lucene.filter
Class MultiTermFilter
java.lang.Object
org.apache.lucene.search.Filter
com.atlassian.confluence.search.lucene.filter.MultiTermFilter
- All Implemented Interfaces:
- Serializable
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.)
- See Also:
- Serialized Form
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)
|
BitSet |
bits(org.apache.lucene.index.IndexReader reader)
|
Methods inherited from class org.apache.lucene.search.Filter |
getDocIdSet |
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:
IllegalArgumentException
- if the null term parameter is supplied
bits
public BitSet bits(org.apache.lucene.index.IndexReader reader)
throws IOException
- Overrides:
bits
in class org.apache.lucene.search.Filter
- Throws:
IOException
Copyright © 2003-2013 Atlassian. All Rights Reserved.