public class TextIndexLucene extends Object implements TextIndex
| Modifier and Type | Field and Description |
|---|---|
static org.apache.lucene.document.FieldType |
ftIRI |
static org.apache.lucene.document.FieldType |
ftString |
| Constructor and Description |
|---|
TextIndexLucene(org.apache.lucene.store.Directory directory,
TextIndexConfig config)
Constructs a new TextIndexLucene.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntity(Entity entity) |
void |
close() |
void |
commit() |
void |
deleteEntity(Entity entity) |
Map<String,Node> |
get(String uri)
Get all entries for uri
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer() |
org.apache.lucene.store.Directory |
getDirectory() |
EntityDefinition |
getDocDef() |
org.apache.lucene.index.IndexWriter |
getIndexWriter() |
org.apache.lucene.analysis.Analyzer |
getQueryAnalyzer() |
void |
prepareCommit() |
List<TextHit> |
query(List<Resource> props,
String qs,
String graphURI,
String lang,
int limit,
String highlight) |
List<TextHit> |
query(Node subj,
List<Resource> props,
String qs,
String graphURI,
String lang,
int limit,
String highlight) |
List<TextHit> |
query(Node property,
String qs,
String graphURI,
String lang) |
List<TextHit> |
query(Node property,
String qs,
String graphURI,
String lang,
int limit)
Access the index - limit if -1 for as many as possible
Throw QueryParseException for syntax errors in the query string.
|
List<TextHit> |
query(Node propNode,
String qs,
String graphURI,
String lang,
int limit,
String highlight) |
List<TextHit> |
query(String subjectUri,
List<Resource> props,
String qs,
String graphURI,
String lang,
int limit,
String highlight) |
List<TextHit> |
query(String subjectUri,
Node propNode,
String qs,
String graphURI,
String lang,
int limit,
String highlight) |
void |
rollback() |
void |
updateEntity(Entity entity) |
public static final org.apache.lucene.document.FieldType ftIRI
public static final org.apache.lucene.document.FieldType ftString
public TextIndexLucene(org.apache.lucene.store.Directory directory,
TextIndexConfig config)
directory - The Lucene Directory for the indexconfig - The config definition for the index instantiation.public org.apache.lucene.store.Directory getDirectory()
public org.apache.lucene.analysis.Analyzer getAnalyzer()
public org.apache.lucene.analysis.Analyzer getQueryAnalyzer()
public org.apache.lucene.index.IndexWriter getIndexWriter()
public void prepareCommit()
prepareCommit in interface TextIndexpublic void close()
close in interface org.apache.jena.atlas.lib.Closeablepublic void updateEntity(Entity entity)
updateEntity in interface TextIndexpublic void deleteEntity(Entity entity)
deleteEntity in interface TextIndexpublic Map<String,Node> get(String uri)
TextIndexpublic List<TextHit> query(Node property, String qs, String graphURI, String lang, int limit)
TextIndexpublic List<TextHit> query(Node propNode, String qs, String graphURI, String lang, int limit, String highlight)
public List<TextHit> query(String subjectUri, Node propNode, String qs, String graphURI, String lang, int limit, String highlight)
public List<TextHit> query(List<Resource> props, String qs, String graphURI, String lang, int limit, String highlight)
public List<TextHit> query(Node subj, List<Resource> props, String qs, String graphURI, String lang, int limit, String highlight)
public List<TextHit> query(String subjectUri, List<Resource> props, String qs, String graphURI, String lang, int limit, String highlight)
public EntityDefinition getDocDef()
Licenced under the Apache License, Version 2.0