Classes | |
class | ConfigurationImpl |
Public Types | |
enum | KeySorting { UNSORTED, SORTED } |
enum | ValueSorting { DISABLED, ASCENDING, DESCENDING } |
Public Member Functions | |
Configuration () | |
long | getExpectedNumberOfRecords () |
File | getIndexDirectory () |
File | getInputDirectory () |
KeySorting | getKeySorting () |
Memory | getMaxMemoryUsage () |
ValueSorting | getValueSorting () |
PrintStream | printTo (PrintStream stream) |
void | setExpectedNumberOfRecords (long numberOfRecords) |
void | setIndexDirectory (File indexDirectory) |
void | setInputDirectory (File inputDirectory) |
void | setKeySorting (KeySorting sorting) |
void | setMaxMemoryUsage (Memory maxMemoryUsage) |
void | setValueSorting (ValueSorting sorting) |
Static Public Attributes | |
static final String | NATIVE_LIB = "aitools3-aq-invertedindex-1.2.6-jna" |
Protected Attributes | |
ConfigurationImpl | impl |
A configuration class to setup instances of Indexer, ManagedIndexer and Searcher.
Definition at line 19 of file Configuration.java.
Modes defining the sorting of keys.
Definition at line 36 of file Configuration.java.
Modes defining the sorting of values.
Definition at line 41 of file Configuration.java.
de::aitools::aq::invertedindex::core::Configuration::Configuration | ( | ) | [inline] |
Creates a default configuration with setKeySorting(KeySorting) set to KeySorting#UNSORTED, setValueSorting(ValueSorting) set to ValueSorting#DISABLED, setMaxMemoryUsage(Memory) set to Memory#MB1024 and setInputDirectory(File) and setIndexDirectory(File) left empty.
Definition at line 53 of file Configuration.java.
References impl.
long de::aitools::aq::invertedindex::core::Configuration::getExpectedNumberOfRecords | ( | ) | [inline] |
Returns the total number of records expected to be inserted.
Definition at line 67 of file Configuration.java.
References impl.
Referenced by printTo().
File de::aitools::aq::invertedindex::core::Configuration::getIndexDirectory | ( | ) | [inline] |
Returns the index directory.
Definition at line 76 of file Configuration.java.
References impl.
Referenced by printTo().
File de::aitools::aq::invertedindex::core::Configuration::getInputDirectory | ( | ) | [inline] |
Returns the input directory.
Definition at line 85 of file Configuration.java.
References impl.
Referenced by printTo().
KeySorting de::aitools::aq::invertedindex::core::Configuration::getKeySorting | ( | ) | [inline] |
Returns the mode of the key sorting.
Definition at line 94 of file Configuration.java.
References impl.
Referenced by printTo().
Memory de::aitools::aq::invertedindex::core::Configuration::getMaxMemoryUsage | ( | ) | [inline] |
Returns the upper bound of memory to use.
Definition at line 103 of file Configuration.java.
References impl.
Referenced by printTo().
ValueSorting de::aitools::aq::invertedindex::core::Configuration::getValueSorting | ( | ) | [inline] |
Returns the mode of the value sorting.
Definition at line 112 of file Configuration.java.
References impl.
Referenced by printTo().
PrintStream de::aitools::aq::invertedindex::core::Configuration::printTo | ( | PrintStream | stream | ) | [inline] |
Prints the content of this object in a human-readable form to the given PrintStream.
stream | the stream to print to |
Definition at line 123 of file Configuration.java.
References getExpectedNumberOfRecords(), getIndexDirectory(), getInputDirectory(), getKeySorting(), getMaxMemoryUsage(), and getValueSorting().
void de::aitools::aq::invertedindex::core::Configuration::setExpectedNumberOfRecords | ( | long | numberOfRecords | ) | [inline] |
Set the number of records expected to be inserted.
numberOfRecords | the total number of records |
Definition at line 139 of file Configuration.java.
References impl.
Referenced by de::aitools::aq::invertedindex::usage::UsingIndexer::main(), and de::aitools::aq::invertedindex::core::TestIndexer::test().
void de::aitools::aq::invertedindex::core::Configuration::setIndexDirectory | ( | File | indexDirectory | ) | [inline] |
Sets the index directory. In the case of Indexer and ManagedIndexer this directory specifies where the index has to be created. In the case of Searcher the index instance to load is expected in this directory.
indexDirectory | the path of the index directory |
Definition at line 151 of file Configuration.java.
References impl.
Referenced by de::aitools::aq::invertedindex::usage::GoogleBooks::index(), de::aitools::aq::invertedindex::usage::UsingSearcher::main(), de::aitools::aq::invertedindex::usage::UsingManagedIndexer::main(), de::aitools::aq::invertedindex::usage::UsingIndexer::main(), de::aitools::aq::invertedindex::usage::SearcherTerminal::main(), and de::aitools::aq::invertedindex::core::TestIndexer::test().
void de::aitools::aq::invertedindex::core::Configuration::setInputDirectory | ( | File | inputDirectory | ) | [inline] |
Sets the input directory. When using the ManagedIndexer for indexing this path specifies the location of the inverted files.
inputDirectory | the path of the input directory |
Definition at line 162 of file Configuration.java.
References impl.
Referenced by de::aitools::aq::invertedindex::usage::UsingManagedIndexer::main().
void de::aitools::aq::invertedindex::core::Configuration::setKeySorting | ( | KeySorting | sorting | ) | [inline] |
Sets the mode of the key sorting.
sorting | the key sorting mode |
Definition at line 172 of file Configuration.java.
References impl.
Referenced by de::aitools::aq::invertedindex::usage::GoogleBooks::index(), de::aitools::aq::invertedindex::usage::UsingManagedIndexer::main(), and de::aitools::aq::invertedindex::usage::UsingIndexer::main().
void de::aitools::aq::invertedindex::core::Configuration::setMaxMemoryUsage | ( | Memory | maxMemoryUsage | ) | [inline] |
Sets the maximal amount of memory the index is required to use during indexing. If Memory#MinRequired is specified the index tries best attempt to work with minimal footprint. In general a higher value can increase the indexing and/or search performance.
maxMemoryUsage | the maximal amount of memory to use |
Definition at line 184 of file Configuration.java.
References impl.
Referenced by de::aitools::aq::invertedindex::usage::UsingManagedIndexer::main(), and de::aitools::aq::invertedindex::usage::UsingIndexer::main().
void de::aitools::aq::invertedindex::core::Configuration::setValueSorting | ( | ValueSorting | sorting | ) | [inline] |
Sets the mode of the value sorting.
sorting | the value sorting mode |
Definition at line 193 of file Configuration.java.
References impl.
Referenced by de::aitools::aq::invertedindex::usage::GoogleBooks::index(), de::aitools::aq::invertedindex::usage::UsingManagedIndexer::main(), and de::aitools::aq::invertedindex::usage::UsingIndexer::main().
ConfigurationImpl de::aitools::aq::invertedindex::core::Configuration::impl [protected] |
Definition at line 197 of file Configuration.java.
Referenced by Configuration(), getExpectedNumberOfRecords(), getIndexDirectory(), getInputDirectory(), getKeySorting(), getMaxMemoryUsage(), getValueSorting(), de::aitools::aq::invertedindex::core::Searcher< V extends Value >::open(), de::aitools::aq::invertedindex::core::Indexer< V extends Value >::open(), setExpectedNumberOfRecords(), setIndexDirectory(), setInputDirectory(), setKeySorting(), setMaxMemoryUsage(), and setValueSorting().
final String de::aitools::aq::invertedindex::core::Configuration::NATIVE_LIB = "aitools3-aq-invertedindex-1.2.6-jna" [static] |
The name of the native library.
Definition at line 23 of file Configuration.java.