use of de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper in project Krill by KorAP.
the class TestSpanSegmentQuery method spanSegmentQuery.
@Test
public void spanSegmentQuery() throws QueryException {
SpanSegmentQueryWrapper ssquery = new SpanSegmentQueryWrapper("field", "a");
assertEquals("field:a", ssquery.toQuery().toString());
ssquery = new SpanSegmentQueryWrapper("field", "a", "b");
assertEquals("spanSegment(field:a, field:b)", ssquery.toQuery().toString());
ssquery = new SpanSegmentQueryWrapper("field", "a", "b", "c");
assertEquals("spanSegment(spanSegment(field:a, field:b), field:c)", ssquery.toQuery().toString());
}
use of de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper in project Krill by KorAP.
the class TestSpanAlterQuery method spanAlterQuery4.
@Test
public void spanAlterQuery4() throws QueryException {
SpanSegmentQueryWrapper segquery = new SpanSegmentQueryWrapper("field", "a", "b", "c");
SpanAlterQueryWrapper ssaquery = new SpanAlterQueryWrapper("field");
ssaquery.or("d").or(segquery).or("e");
assertEquals("spanOr([field:d, spanSegment(spanSegment(field:a, field:b), field:c), field:e])", ssaquery.toQuery().toString());
}
use of de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper in project Krill by KorAP.
the class TestSpanSegmentSequenceQuery method spanSegmentSequenceQueryPrepend2.
@Test
public void spanSegmentSequenceQueryPrepend2() throws QueryException {
SpanSequenceQueryWrapper sssq = new SpanSequenceQueryWrapper("field", "d", "e");
SpanSegmentQueryWrapper ssq = new SpanSegmentQueryWrapper("field", "-a", "-b", "-c");
sssq.prepend(ssq);
assertEquals("spanNext(spanNext(spanSegment(spanSegment(field:-a, field:-b), field:-c), field:d), field:e)", sssq.toQuery().toString());
}
Aggregations