public class MockSpans extends BLSpans
childClausesCaptureGroups, MAX_UNLIMITED
Constructor and Description |
---|
MockSpans(int[] doc,
int[] start,
int[] end) |
Modifier and Type | Method and Description |
---|---|
int |
advance(int target) |
void |
collect(org.apache.lucene.search.spans.SpanCollector collector) |
int |
docID() |
static MockSpans |
emptySpans() |
int |
endPosition() |
static MockSpans |
fromLists(int[] doc,
int[] start,
int[] end) |
void |
getCapturedGroups(Span[] capturedGroups)
Get the start and end position for the captured groups contained in this
BLSpans (sub)tree.
|
int |
nextDoc() |
int |
nextStartPosition() |
void |
passHitQueryContextToClauses(HitQueryContext context)
Called by setHitQueryContext() to pass the context to child clauses.
|
float |
positionsCost() |
static MockSpans |
single(int doc,
int start,
int end) |
int |
startPosition() |
int |
width() |
static MockSpans |
withEndInPayload(int[] aDoc,
int[] aStart,
int[] aEnd) |
advanceStartPosition, cost, optSortUniq, setHitQueryContext
public int docID()
docID
in class org.apache.lucene.search.DocIdSetIterator
public int endPosition()
endPosition
in class org.apache.lucene.search.spans.Spans
public int nextDoc() throws IOException
nextDoc
in class org.apache.lucene.search.DocIdSetIterator
IOException
public int nextStartPosition() throws IOException
nextStartPosition
in class org.apache.lucene.search.spans.Spans
IOException
public int advance(int target) throws IOException
advance
in class org.apache.lucene.search.DocIdSetIterator
IOException
public int startPosition()
startPosition
in class org.apache.lucene.search.spans.Spans
public void passHitQueryContextToClauses(HitQueryContext context)
BLSpans
passHitQueryContextToClauses
in class BLSpans
context
- the hit query context, that e.g. keeps track of captured
groupspublic void getCapturedGroups(Span[] capturedGroups)
BLSpans
getCapturedGroups
in class BLSpans
capturedGroups
- an array the size of the total number of groups in the
query; the start and end positions for the groups in this subtree
will be placed in here.public static MockSpans emptySpans()
public static MockSpans single(int doc, int start, int end)
public static MockSpans fromLists(int[] doc, int[] start, int[] end)
public static MockSpans withEndInPayload(int[] aDoc, int[] aStart, int[] aEnd)
public int width()
width
in class org.apache.lucene.search.spans.Spans
public void collect(org.apache.lucene.search.spans.SpanCollector collector) throws IOException
collect
in class org.apache.lucene.search.spans.Spans
IOException
public float positionsCost()
positionsCost
in class org.apache.lucene.search.spans.Spans
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.