Constructor and Description |
---|
DocImpl(BlackLabIndex index,
int id) |
Modifier and Type | Method and Description |
---|---|
void |
characterOffsets(Field field,
int[] startsOfWords,
int[] endsOfWords,
boolean fillInDefaultsIfNotFound) |
String |
contents(Field field,
int startAtWord,
int endAtWord)
Get part of the contents of a field from a Lucene Document.
|
String |
contentsByCharPos(Field field,
int startAtChar,
int endAtChar)
Get part of the contents of a field from a Lucene Document.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
highlightContent(Hits hits,
int startAtWord,
int endAtWord)
Highlight part of field content with the specified hits,
and make sure it's well-formed.
|
int |
id() |
BlackLabIndex |
index() |
boolean |
isLuceneDocCached()
Have we loaded and cached the Lucene document?
|
org.apache.lucene.document.Document |
luceneDoc()
Retrieve a Lucene Document object from the index.
|
List<Concordance> |
makeConcordancesFromContentStore(Field field,
int[] startsOfWords,
int[] endsOfWords,
XmlHighlighter hl)
Determine the concordance strings for a number of concordances, given the
relevant character positions.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
contents, contents, get, highlightContent
public DocImpl(BlackLabIndex index, int id)
public BlackLabIndex index()
public org.apache.lucene.document.Document luceneDoc()
Doc
public boolean isLuceneDocCached()
Doc
isLuceneDocCached
in interface Doc
public void characterOffsets(Field field, int[] startsOfWords, int[] endsOfWords, boolean fillInDefaultsIfNotFound)
characterOffsets
in interface Doc
public String contentsByCharPos(Field field, int startAtChar, int endAtChar)
Doc
contentsByCharPos
in interface Doc
field
- the fieldstartAtChar
- where to start getting the content (-1 for start of document, 0 for first char)endAtChar
- where to end getting the content (-1 for end of document)public String contents(Field field, int startAtWord, int endAtWord)
Doc
public String highlightContent(Hits hits, int startAtWord, int endAtWord)
Doc
highlightContent
in interface Doc
hits
- the hitsstartAtWord
- where to start highlighting (first word returned)endAtWord
- where to end highlighting (first word not returned)public List<Concordance> makeConcordancesFromContentStore(Field field, int[] startsOfWords, int[] endsOfWords, XmlHighlighter hl)
Doc
makeConcordancesFromContentStore
in interface Doc
field
- the fieldstartsOfWords
- the array of starts of words ([A] and [B] positions)endsOfWords
- the array of ends of words ([C] and [D] positions)public int hashCode()
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.