org.apache.lucene.search
Class WildcardQuery
java.lang.Object
   org.apache.lucene.search.Query
org.apache.lucene.search.Query
       org.apache.lucene.search.MultiTermQuery
org.apache.lucene.search.MultiTermQuery
           org.apache.lucene.search.WildcardQuery
org.apache.lucene.search.WildcardQuery
- All Implemented Interfaces: 
- Serializable, Cloneable
- public class WildcardQuery 
- extends MultiTermQuery
Implements the wildcard search query. Supported wildcards are *, which
 matches any character sequence (including the empty one), and ?,
 which matches any single character. Note this query can be slow, as it
 needs to iterate over many terms. In order to prevent extremely slow WildcardQueries,
 a Wildcard term should not start with one of the wildcards * or
 ?.
 
 
This query uses the MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
 rewrite method.
- See Also:
- WildcardTermEnum, 
Serialized Form
 
 
 
 
 
 
 
 
 
term
protected Term term
WildcardQuery
public WildcardQuery(Term term)
getEnum
protected FilteredTermEnum getEnum(IndexReader reader)
                            throws IOException
- Description copied from class: MultiTermQuery
- Construct the enumeration to be used, expanding the pattern term.
 
- 
- Specified by:
- getEnumin class- MultiTermQuery
 
- 
- Throws:
- IOException
 
getTerm
public Term getTerm()
- Returns the pattern term.
 
- 
 
rewrite
public Query rewrite(IndexReader reader)
              throws IOException
- Description copied from class: Query
- Expert: called to re-write queries into primitive queries. For example,
 a PrefixQuery will be rewritten into a BooleanQuery that consists
 of TermQuerys.
 
- 
- Overrides:
- rewritein class- MultiTermQuery
 
- 
- Throws:
- IOException
 
toString
public String toString(String field)
- Prints a user-readable version of this query.
 
- 
- Specified by:
- toStringin class- Query
 
- 
 
hashCode
public int hashCode()
- 
- Overrides:
- hashCodein class- MultiTermQuery
 
- 
 
equals
public boolean equals(Object obj)
- 
- Overrides:
- equalsin class- MultiTermQuery
 
- 
 
Copyright © 2000-2010 Apache Software Foundation.  All Rights Reserved.