org.apache.lucene.sandbox.queries.regex

## Interface RegexCapabilities.RegexMatcher

- Enclosing interface:
    RegexCapabilities

  Deprecated.
  Use core's regex query.

      @Deprecated
      public static interface RegexCapabilities.RegexMatcher

  Interface for basic regex matching.

  Implementations return true for `match(org.apache.lucene.util.BytesRef)` if the term matches the regex.

  Implementing `prefix()` can restrict the TermsEnum to only a subset of terms when the regular expression matches a constant prefix.

  NOTE: implementations cannot seek.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `match(BytesRef term)` Deprecated.
    `String` | `prefix()` Deprecated. A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!

- - ### Method Detail

    - #### match

          boolean match(BytesRef term)

      Deprecated.
      Parameters:
        `term` - The term in bytes.
      Returns:
        true if string matches the pattern last passed to `RegexCapabilities.compile(java.lang.String)`.

    - #### prefix

          String prefix()

      Deprecated.
      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 `RegexCapabilities.compile(java.lang.String)`. May return null.

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.