## org.apache.lucene.search.regex
Class SpanRegexQuery

    java.lang.Object
      org.apache.lucene.search.Query
          org.apache.lucene.search.spans.SpanQuery
              org.apache.lucene.search.regex.SpanRegexQuery

All Implemented Interfaces:
  Serializable, Cloneable, RegexQueryCapable

    public class SpanRegexQuery

extends SpanQuery
implements RegexQueryCapable

A SpanQuery version of `RegexQuery` allowing regular expression queries to be nested within other SpanQuery subclasses.

See Also:
  Serialized Form

Constructor Summary
`SpanRegexQuery(Term term)`

Method Summary
`boolean` `equals(Object o)`
`String` `getField()`
`RegexCapabilities` `getRegexImplementation()`
`Spans` `getSpans(IndexReader reader)`
`Term` `getTerm()`
`Collection` `getTerms()`
`int` `hashCode()`
`Query` `rewrite(IndexReader reader)`
`void` `setRegexImplementation(RegexCapabilities impl)`
`String` `toString(String field)`

Methods inherited from class org.apache.lucene.search.spans.SpanQuery
`createWeight`

Methods inherited from class org.apache.lucene.search.Query
`clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SpanRegexQuery

    public SpanRegexQuery(Term term)

Method Detail

### getTerm

    public Term getTerm()

### rewrite

    public Query rewrite(IndexReader reader)
                  throws IOException

  Overrides:
    `rewrite` in class `Query`
  Throws:
    `IOException`

### getSpans

    public Spans getSpans(IndexReader reader)
                   throws IOException

  Specified by:
    `getSpans` in class `SpanQuery`
  Throws:
    `IOException`

### getField

    public String getField()

  Specified by:
    `getField` in class `SpanQuery`

### getTerms

    public Collection getTerms()

  Specified by:
    `getTerms` in class `SpanQuery`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString(String field)

  Specified by:
    `toString` in class `Query`

### setRegexImplementation

    public void setRegexImplementation(RegexCapabilities impl)

  Specified by:
    `setRegexImplementation` in interface `RegexQueryCapable`

### getRegexImplementation

    public RegexCapabilities getRegexImplementation()

  Specified by:
    `getRegexImplementation` in interface `RegexQueryCapable`

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