Span Queries (first, near, not, or, term)edit

See: * Span Term Query * Span First Query * Span Near Query * Span Not Query * Span Or Query

// Span Term
QueryBuilder qb = spanTermQuery(



// Span First
QueryBuilder qb = spanFirstQuery(
    spanTermQuery("user", "kimchy"),            


max end position

// Span Near
QueryBuilder qb = spanNearQuery()

span term queries

slop factor: the maximum number of intervening unmatched positions

whether matches are required to be in-order

collect payloads or not

// Span Not
QueryBuilder qb = spanNotQuery()

span query whose matches are filtered

span query whose matches must not overlap those returned

// Span Or
QueryBuilder qb = spanOrQuery()

span term queries