FileDocCategorySizeDatePackage
RegexCapabilities.javaAPI DocApache Lucene 2.1.01648Wed Feb 14 10:46:32 GMT 2007org.apache.lucene.search.regex

RegexCapabilities

public interface RegexCapabilities
Defines basic operations needed by {@link RegexQuery} for a regular expression implementation.

Fields Summary
Constructors Summary
Methods Summary
public voidcompile(java.lang.String pattern)
Called by the constructor of {@link RegexTermEnum} allowing implementations to cache a compiled version of the regular expression pattern.

param
pattern regular expression pattern

public booleanmatch(java.lang.String string)

param
string
return
true if string matches the pattern last passed to {@link #compile}.

public java.lang.Stringprefix()
A wise prefix implementation can reduce the term enumeration (and thus performance) of RegexQuery dramatically!

return
static non-regex prefix of the pattern last passed to {@link #compile}. May return null.