public class

WildcardTermEnum

extends FilteredTermEnum
java.lang.Object
   ↳ org.apache.lucene.index.TermEnum
     ↳ org.apache.lucene.search.FilteredTermEnum
       ↳ org.apache.lucene.search.WildcardTermEnum

Class Overview

Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Summary

Constants
char WILDCARD_CHAR
char WILDCARD_STRING String equality with support for wildcards
[Expand]
Inherited Fields
From class org.apache.lucene.search.FilteredTermEnum
Public Constructors
WildcardTermEnum(IndexReader reader, Term term)
Creates a new WildcardTermEnum.
Public Methods
float difference()
Equality measure on the term
final boolean endEnum()
Indicates the end of the enumeration has been reached
final static boolean wildcardEquals(String pattern, int patternIdx, String string, int stringIdx)
Determines if a word matches a wildcard pattern.
Protected Methods
final boolean termCompare(Term term)
Equality compare on the term
[Expand]
Inherited Methods
From class org.apache.lucene.search.FilteredTermEnum
From class org.apache.lucene.index.TermEnum
From class java.lang.Object
From interface java.io.Closeable

Constants

public static final char WILDCARD_CHAR

Constant Value: 63 (0x0000003f)

public static final char WILDCARD_STRING

String equality with support for wildcards

Constant Value: 42 (0x0000002a)

Public Constructors

public WildcardTermEnum (IndexReader reader, Term term)

Creates a new WildcardTermEnum.

After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

Throws
IOException

Public Methods

public float difference ()

Equality measure on the term

public final boolean endEnum ()

Indicates the end of the enumeration has been reached

public static final boolean wildcardEquals (String pattern, int patternIdx, String string, int stringIdx)

Determines if a word matches a wildcard pattern. Work released by Granta Design Ltd after originally being done on company time.

Protected Methods

protected final boolean termCompare (Term term)

Equality compare on the term