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 |
static org.apache.lucene.util.Version |
VER |
| 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(Node property,
String qs) |
List<TextHit> |
query(Node property,
String qs,
int limit)
Access the index - limit if -1 for as many as possible
Throw QueryParseException for syntax errors in the query string.
|
void |
rollback() |
void |
updateEntity(Entity entity) |
public static final org.apache.lucene.util.Version VER
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, int limit)
TextIndexpublic EntityDefinition getDocDef()
Licenced under the Apache License, Version 2.0