Package org.apache.lucene.queries.spans

# Class SpanContainingQuery

java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.queries.spans.SpanQuery
org.apache.lucene.queries.spans.SpanContainingQuery

All Implemented Interfaces:
  `Cloneable`

public final class SpanContainingQuery extends SpanQuery
Keep matches that contain another SpanScorer.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`SpanContainingQuery.SpanContainingWeight`
Creates SpanContainingQuery scorer instances

## Constructor Summary

Constructors
Constructor
Description
`SpanContainingQuery(SpanQuery big, SpanQuery little)`
Construct a SpanContainingQuery matching spans from `big` that contain at least one spans from `little`.

## Method Summary

Modifier and Type
Method
Description
`SpanWeight`
`createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)`
`boolean`
`equals(Object other)`
`SpanQuery`
`getBig()`
`String`
`getField()`
Returns the name of the field matched by this query.
`SpanQuery`
`getLittle()`
`int`
`hashCode()`
`Query`
`rewrite(IndexSearcher indexSearcher)`
`String`
`toString(String field)`
`void`
`visit(QueryVisitor visitor)`

### Methods inherited from class org.apache.lucene.queries.spans.SpanQuery

`getTermStates, getTermStates`

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

`classHash, sameClassAs, toString`

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

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

## Constructor Details

### SpanContainingQuery

public SpanContainingQuery(SpanQuery big, SpanQuery little)
Construct a SpanContainingQuery matching spans from `big` that contain at least one spans from `little`. This query has the boost of `big`. `big` and `little` must be in the same field.

## Method Details

### toString

public String toString(String field)

Specified by:
  `toString` in class `Query`

### createWeight

public SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException

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

### 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`

### getBig

public SpanQuery getBig()

### getLittle

public SpanQuery getLittle()

### rewrite

public Query rewrite(IndexSearcher indexSearcher) throws IOException

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

### visit

public void visit(QueryVisitor visitor)

Specified by:
  `visit` in class `Query`

### equals

public boolean equals(Object other)

Specified by:
  `equals` in class `Query`

### hashCode

public int hashCode()

Specified by:
  `hashCode` in class `Query`