public class Indexer extends Object implements AutoCloseable
Constructor and Description |
---|
Indexer(org.apache.lucene.store.Directory dir,
Language language) |
Indexer(org.apache.lucene.store.Directory dir,
Language language,
org.apache.lucene.analysis.Analyzer analyzer) |
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.lucene.document.Document doc) |
void |
close() |
void |
commit() |
void |
indexSentence(Sentence sentence,
int docCount) |
void |
indexText(BufferedReader reader) |
static void |
main(String[] args) |
static void |
run(String content,
org.apache.lucene.store.Directory dir,
Language language) |
void |
setLowercaseOnly(boolean lowercaseOnly)
Set to true to index only a lowercase field (makes index smaller).
|
public Indexer(org.apache.lucene.store.Directory dir, Language language)
public Indexer(org.apache.lucene.store.Directory dir, Language language, org.apache.lucene.analysis.Analyzer analyzer)
public void setLowercaseOnly(boolean lowercaseOnly)
public static void main(String[] args) throws IOException
IOException
public static void run(String content, org.apache.lucene.store.Directory dir, Language language) throws IOException
IOException
public void indexSentence(Sentence sentence, int docCount) throws IOException
IOException
public void indexText(BufferedReader reader) throws IOException
IOException
public void add(org.apache.lucene.document.Document doc) throws IOException
IOException
public void close() throws IOException
close
in interface AutoCloseable
IOException
public void commit() throws IOException
IOException