public class ContentAccessor extends Object
Constructor and Description |
---|
ContentAccessor(Field field,
ContentStore contentStore) |
ContentAccessor(String fieldName) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
delete(org.apache.lucene.document.Document d) |
ContentStore |
getContentStore() |
String |
getFieldName() |
String[] |
getSubstringsFromDocument(org.apache.lucene.document.Document d,
int[] start,
int[] end)
Get substrings from a document.
|
String[] |
getSubstringsFromDocument(int contentId,
int[] start,
int[] end)
Get substrings from a document.
|
protected String fieldName
public ContentAccessor(Field field, ContentStore contentStore)
public ContentAccessor(String fieldName)
public String getFieldName()
public ContentStore getContentStore()
public String[] getSubstringsFromDocument(org.apache.lucene.document.Document d, int[] start, int[] end)
d
- the Lucene document (contains the file name)start
- start positions of the substrings. -1 means start of document.end
- end positions of the substrings. -1 means end of document.public String[] getSubstringsFromDocument(int contentId, int[] start, int[] end)
contentId
- the content idstart
- start positions of the substrings. -1 means start of document.end
- end positions of the substrings. -1 means end of document.public void delete(org.apache.lucene.document.Document d)
public void close()
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.