Package org.apache.lucene.search
Class PrefixFilter
- java.lang.Object
-
- org.apache.lucene.search.Filter
-
- org.apache.lucene.search.MultiTermQueryWrapperFilter<PrefixQuery>
-
- org.apache.lucene.search.PrefixFilter
-
public class PrefixFilter extends MultiTermQueryWrapperFilter<PrefixQuery>
A Filter that restricts search results to values that have a matching prefix in a given field.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter
query
-
-
Constructor Summary
Constructors Constructor Description PrefixFilter(Term prefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Term
getPrefix()
String
toString()
Prints a user-readable version of this query.-
Methods inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter
equals, getDocIdSet, getField, hashCode
-
-
-
-
Constructor Detail
-
PrefixFilter
public PrefixFilter(Term prefix)
-
-
Method Detail
-
getPrefix
public Term getPrefix()
-
toString
public String toString()
Prints a user-readable version of this query.- Overrides:
toString
in classMultiTermQueryWrapperFilter<PrefixQuery>
-
-