public abstract class LuceneIndex extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.lucene.analysis.Analyzer |
analyzer |
protected static org.slf4j.Logger |
log |
protected org.deeplearning4j.text.tokenization.tokenizer.TokenPreProcess |
preprocessor |
protected org.apache.lucene.index.IndexReader |
reader |
protected org.apache.lucene.search.IndexSearcher |
searcher |
protected info.debatty.java.stringsimilarity.interfaces.NormalizedStringSimilarity |
sim |
| Constructor and Description |
|---|
LuceneIndex() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addNameField(org.apache.lucene.document.Document doc,
String name,
String value)
A NameField is a tokenized lowercase field in Lucene.
|
protected void |
addStringField(org.apache.lucene.document.Document doc,
String name,
String value)
A StringField is a non-tokenized field in Lucene.
|
protected void |
addTextField(org.apache.lucene.document.Document doc,
String name,
String value,
org.apache.lucene.document.Field.Store store)
A TextField is a tokenized field in Lucene.
|
protected abstract org.apache.lucene.analysis.Analyzer |
buildAnalyzer() |
protected boolean |
openIndex(org.apache.lucene.store.Directory index) |
boolean |
openIndex(Resource path)
tries to open an existing index from given path
|
protected String |
splitString(String name,
String suffix) |
protected static final org.slf4j.Logger log
protected org.apache.lucene.index.IndexReader reader
protected org.apache.lucene.search.IndexSearcher searcher
protected org.apache.lucene.analysis.Analyzer analyzer
protected final info.debatty.java.stringsimilarity.interfaces.NormalizedStringSimilarity sim
protected final org.deeplearning4j.text.tokenization.tokenizer.TokenPreProcess preprocessor
public boolean openIndex(Resource path) throws IOException
IOExceptionprotected boolean openIndex(org.apache.lucene.store.Directory index)
throws IOException
IOExceptionprotected abstract org.apache.lucene.analysis.Analyzer buildAnalyzer()
protected void addTextField(org.apache.lucene.document.Document doc,
String name,
String value,
org.apache.lucene.document.Field.Store store)
protected void addStringField(org.apache.lucene.document.Document doc,
String name,
String value)
Copyright © 2019. All rights reserved.