Class | Ferret::Search::Spans::SpanNotQuery
In: | ext/r_search.c
Parent: | Ferret::Search::Query

## Summary

SpanNotQuery is like a BooleanQuery with a +:must_not+ clause. The difference being that the resulting query can be used in another SpanQuery.

## Example

Let‘s say you wanted to search for all documents with the term "rails" near the start but without the term "train" near the start. This would allow the term "train" to occur later on in the document.

      rails_query = SpanFirstQuery.new(SpanTermQuery.new(:content, "rails"), 100)
      train_query = SpanFirstQuery.new(SpanTermQuery.new(:content, "train"), 100)
      query = SpanNotQuery.new(rails_query, train_query)

## NOTE

SpanOrQuery only works with other SpanQueries.

### Methods

new

### Public Class methods

SpanNotQuery.new(include_query, exclude_query) → query

Create a new SpanNotQuery which matches all documents which match `include_query` and don‘t match `exclude_query`.

[Validate]