RegexCapabilities (Lucene 3.6.2 API)
Keywords: org.apache.lucene.search.regex.RegexCapabilities interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.search.regex
Interface RegexCapabilities

All Known Implementing Classes:
  JakartaRegexpCapabilities, JavaUtilRegexCapabilities

    public interface RegexCapabilities

Defines basic operations needed by `RegexQuery` for a regular expression implementation.

Method Summary
`void` | `compile(String pattern)` Called by the constructor of `RegexTermEnum` allowing implementations to cache a compiled version of the regular expression pattern.
`boolean` | `match(String string)`
`String` | `prefix()` A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!

Method Detail

### compile

    void compile(String pattern)

  Called by the constructor of `RegexTermEnum` allowing implementations to cache a compiled version of the regular expression pattern.

  Parameters:
    `pattern` - regular expression pattern

### match

    boolean match(String string)

  Parameters:
    `string` -
  Returns:
    true if string matches the pattern last passed to `compile(java.lang.String)`.

### prefix

    String prefix()

  A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!

  Returns:
    static non-regex prefix of the pattern last passed to `compile(java.lang.String)`. May return null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD