public class IndexConfig extends Object
IndexConfig is used to provide different index configurations for different folders.| Modifier and Type | Class and Description |
|---|---|
class |
IndexConfig.ConfigEntry
A
ConfigEntry provides informations about how to index a certion folder, which includes the name of the
folder itself, the language-code for the contents of this folder, and the name of the Lucene Analyzer to
use. |
| Constructor and Description |
|---|
IndexConfig(String tagPrefix)
Creates a new
ParseTags using the given tag-prefix (usually appNG). |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(String folder,
String language,
String analyzerClass) |
IndexConfig.ConfigEntry |
getEntry(String folder) |
SortedSet<String> |
getFolders() |
static IndexConfig |
getInstance(List<String> configEntries,
String tagPrefix)
Parses a list of strings to an
IndexConfig. |
static IndexConfig |
getInstance(String configString,
String tagPrefix)
Parses a given String to an
IndexConfig, using the pipe '|' for separating folders.format: <folder>;<language>;<analyzer-class>|Example: /de;de-DE;GermanAnalyzer|/en;en-US;org.apache.lucene.analysis.en.EnglishAnalyzer|/assets;de-DE;GermanAnalyzer |
IndexWriterConfig.OpenMode |
getOpenMode() |
String |
getTagPrefix() |
void |
setOpenMode(IndexWriterConfig.OpenMode openMode) |
public IndexConfig(String tagPrefix)
ParseTags using the given tag-prefix (usually appNG).tagPrefix - the tag prefix to usepublic static IndexConfig getInstance(String configString, String tagPrefix)
IndexConfig, using the pipe '|' for separating folders.<folder>;<language>;<analyzer-class>|/de;de-DE;GermanAnalyzer|/en;en-US;org.apache.lucene.analysis.en.EnglishAnalyzer|/assets;de-DE;GermanAnalyzer
If the analyzer class isn't fully qualified, the following name-schema is applied:org.apache.lucene.analysis.<folder>.<analyzer-class>configString - the string to parse the IndexConfig fromtagPrefix - the tag prefix to useIndexConfig instancepublic static IndexConfig getInstance(List<String> configEntries, String tagPrefix)
IndexConfig. Each string has the following format:<folder>;<language>;<analyzer-class>/en;en-US;org.apache.lucene.analysis.en.EnglishAnalyzerconfigEntries - a list of config entriestagPrefix - the tag prefix to useIndexConfig instancepublic IndexConfig.ConfigEntry getEntry(String folder)
public IndexWriterConfig.OpenMode getOpenMode()
public void setOpenMode(IndexWriterConfig.OpenMode openMode)
public String getTagPrefix()
Copyright © 2011–2017 aiticon GmbH. All rights reserved.