org.apache.lucene.search.spans
Class SpanOrQuery

Object
  extended by Query
      extended by SpanQuery
          extended by SpanOrQuery
All Implemented Interfaces:
Serializable, Cloneable

public class SpanOrQuery
extends SpanQuery

Matches the union of its clauses.

See Also:
Serialized Form

Nested Class Summary
private  class SpanOrQuery.SpanQueue
           
 
Field Summary
private  List clauses
           
private  String field
           
 
Constructor Summary
SpanOrQuery(SpanQuery[] clauses)
          Construct a SpanOrQuery merging the provided clauses.
 
Method Summary
 SpanQuery[] getClauses()
          Return the clauses whose spans are matched.
 String getField()
          Returns the name of the field matched by this query.
 Spans getSpans(IndexReader reader, Searcher searcher)
          Expert: Returns the matches for this query in an index.
 Query[] getSubQueries()
           
 Collection getTerms()
          Returns a collection of all terms matched by this query.
 Query rewrite(IndexReader reader)
           
 String toString(String field)
           
 
Methods inherited from class SpanQuery
createWeight, getSpanRecording, setSpanRecording
 
Methods inherited from class Query
clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clauses

private List clauses

field

private String field
Constructor Detail

SpanOrQuery

public SpanOrQuery(SpanQuery[] clauses)
Construct a SpanOrQuery merging the provided clauses.

Method Detail

getClauses

public SpanQuery[] getClauses()
Return the clauses whose spans are matched.


getField

public String getField()
Description copied from class: SpanQuery
Returns the name of the field matched by this query.

Specified by:
getField in class SpanQuery

getTerms

public Collection getTerms()
Description copied from class: SpanQuery
Returns a collection of all terms matched by this query.

Specified by:
getTerms in class SpanQuery

getSubQueries

public Query[] getSubQueries()

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Overrides:
rewrite in class Query
Throws:
IOException

toString

public String toString(String field)
Specified by:
toString in class Query

getSpans

public Spans getSpans(IndexReader reader,
                      Searcher searcher)
               throws IOException
Description copied from class: SpanQuery
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Specified by:
getSpans in class SpanQuery
Throws:
IOException