public class SpanTestUtil extends Object
Constructor and Description |
---|
SpanTestUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
assertFinished(Spans spans)
Assert that
spans is exhausted. |
static void |
assertNext(Spans spans,
int doc,
int start,
int end)
Assert the next iteration from
spans is a match
from start to end in doc . |
static SpanQuery |
spanContainingQuery(SpanQuery big,
SpanQuery little)
Makes a new SpanContainingQuery (with additional asserts).
|
static SpanQuery |
spanFirstQuery(SpanQuery query,
int end)
Makes a new SpanFirstQuery (with additional asserts).
|
static SpanQuery |
spanNearOrderedQuery(int slop,
SpanQuery... subqueries)
Makes a new ordered SpanNearQuery (with additional asserts)
|
static SpanQuery |
spanNearOrderedQuery(String field,
int slop,
String... terms)
Makes a new ordered SpanNearQuery (with additional asserts) from the provided
terms |
static SpanQuery |
spanNearUnorderedQuery(int slop,
SpanQuery... subqueries)
Makes a new unordered SpanNearQuery (with additional asserts)
|
static SpanQuery |
spanNearUnorderedQuery(String field,
int slop,
String... terms)
Makes a new unordered SpanNearQuery (with additional asserts) from the provided
terms |
static SpanQuery |
spanNotQuery(SpanQuery include,
SpanQuery exclude)
Makes a new SpanNotQuery (with additional asserts).
|
static SpanQuery |
spanNotQuery(SpanQuery include,
SpanQuery exclude,
int pre,
int post)
Makes a new SpanNotQuery (with additional asserts).
|
static SpanQuery |
spanOrQuery(SpanQuery... subqueries)
Makes a new SpanOrQuery (with additional asserts).
|
static SpanQuery |
spanOrQuery(String field,
String... terms)
Makes a new SpanOrQuery (with additional asserts) from the provided
terms . |
static SpanQuery |
spanPositionRangeQuery(SpanQuery query,
int start,
int end)
Makes a new SpanPositionRangeQuery (with additional asserts).
|
static SpanQuery |
spanQuery(SpanQuery query)
Adds additional asserts to a spanquery.
|
static SpanQuery |
spanTermQuery(String field,
String term)
Makes a new SpanTermQuery (with additional asserts).
|
static SpanQuery |
spanWithinQuery(SpanQuery big,
SpanQuery little)
Makes a new SpanWithinQuery (with additional asserts).
|
public static SpanQuery spanQuery(SpanQuery query)
public static SpanQuery spanTermQuery(String field, String term)
public static SpanQuery spanOrQuery(String field, String... terms)
terms
.public static SpanQuery spanOrQuery(SpanQuery... subqueries)
public static SpanQuery spanNotQuery(SpanQuery include, SpanQuery exclude)
public static SpanQuery spanNotQuery(SpanQuery include, SpanQuery exclude, int pre, int post)
public static SpanQuery spanFirstQuery(SpanQuery query, int end)
public static SpanQuery spanPositionRangeQuery(SpanQuery query, int start, int end)
public static SpanQuery spanContainingQuery(SpanQuery big, SpanQuery little)
public static SpanQuery spanWithinQuery(SpanQuery big, SpanQuery little)
public static SpanQuery spanNearOrderedQuery(String field, int slop, String... terms)
terms
public static SpanQuery spanNearOrderedQuery(int slop, SpanQuery... subqueries)
public static SpanQuery spanNearUnorderedQuery(String field, int slop, String... terms)
terms
public static SpanQuery spanNearUnorderedQuery(int slop, SpanQuery... subqueries)
public static void assertNext(Spans spans, int doc, int start, int end) throws IOException
spans
is a match
from start
to end
in doc
.IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.