org.apache.lucene.sandbox.queries.regex

## Class RegexQuery

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.search.MultiTermQuery
    - - org.apache.lucene.sandbox.queries.regex.RegexQuery

- All Implemented Interfaces:
    Cloneable, RegexQueryCapable

  Deprecated.
  Use core's regex query.

      @Deprecated
      public class RegexQuery
      extends MultiTermQuery
      implements RegexQueryCapable

  Implements the regular expression term search query. The expressions supported depend on the regular expression implementation used by way of the `RegexCapabilities` interface.

  NOTE: You may wish to consider using the regex query support in `RegexpQuery` instead, as it has better performance.

  See Also:
    `RegexTermsEnum`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery

      `MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBlendedFreqScoringRewrite, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite`

  - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.search.MultiTermQuery

      `CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_BOOLEAN_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, CONSTANT_SCORE_REWRITE, field, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE, SCORING_BOOLEAN_REWRITE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegexQuery(Term term)` Deprecated. Constructs a query for terms matching `term`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)` Deprecated.
    `RegexCapabilities` | `getRegexImplementation()` Deprecated. Returns the implementation used by this instance.
    `Term` | `getTerm()` Deprecated.
    `protected FilteredTermsEnum` | `getTermsEnum(Terms terms, AttributeSource atts)` Deprecated.
    `int` | `hashCode()` Deprecated.
    `void` | `setRegexImplementation(RegexCapabilities impl)` Deprecated. Defines which `RegexCapabilities` implementation is used by this instance.
    `String` | `toString(String field)` Deprecated.

    - ### Methods inherited from class org.apache.lucene.search.MultiTermQuery

      `getField, getRewriteMethod, getTermsEnum, rewrite, setRewriteMethod`

    - ### Methods inherited from class org.apache.lucene.search.Query

      `clone, createWeight, getBoost, setBoost, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### RegexQuery

          public RegexQuery(Term term)

      Deprecated.
      Constructs a query for terms matching `term`.

  - ### Method Detail

    - #### getTerm

          public Term getTerm()

      Deprecated.

    - #### setRegexImplementation

          public void setRegexImplementation(RegexCapabilities impl)

      Deprecated.
      Description copied from interface: `RegexQueryCapable`
      Defines which `RegexCapabilities` implementation is used by this instance.
      Specified by:
        `setRegexImplementation` in interface `RegexQueryCapable`
      See Also:
        `RegexQueryCapable.getRegexImplementation()`

    - #### getRegexImplementation

          public RegexCapabilities getRegexImplementation()

      Deprecated.
      Description copied from interface: `RegexQueryCapable`
      Returns the implementation used by this instance.
      Specified by:
        `getRegexImplementation` in interface `RegexQueryCapable`
      See Also:
        `RegexQueryCapable.setRegexImplementation(RegexCapabilities)`

    - #### getTermsEnum

          protected FilteredTermsEnum getTermsEnum(Terms terms,
                                       AttributeSource atts)
                                            throws IOException

      Deprecated.
      Specified by:
        `getTermsEnum` in class `MultiTermQuery`
      Throws:
        `IOException`

    - #### toString

          public String toString(String field)

      Deprecated.
      Specified by:
        `toString` in class `Query`

    - #### hashCode

          public int hashCode()

      Deprecated.
      Overrides:
        `hashCode` in class `MultiTermQuery`

    - #### equals

          public boolean equals(Object obj)

      Deprecated.
      Overrides:
        `equals` in class `MultiTermQuery`

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