|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.aq.invertedindex.core.Configuration
public final class Configuration
A configuration class to setup instances of Indexer
,
ManagedIndexer
and Searcher
.
Nested Class Summary | |
---|---|
static class |
Configuration.KeySorting
Modes defining the sorting of keys. |
static class |
Configuration.ValueSorting
Modes defining the sorting of values. |
Field Summary | |
---|---|
static java.lang.String |
NATIVE_LIB
The name of the native library. |
Constructor Summary | |
---|---|
Configuration()
Creates a default configuration with setKeySorting(KeySorting)
set to Configuration.KeySorting.UNSORTED ,
setValueSorting(ValueSorting) set to
Configuration.ValueSorting.DISABLED , setMaxMemoryUsage(Memory) set to
Memory.MB1024 and setInputDirectory(File) and
setIndexDirectory(File) left empty. |
Method Summary | |
---|---|
long |
getExpectedNumberOfRecords()
Returns the total number of records expected to be inserted. |
java.io.File |
getIndexDirectory()
Returns the index directory. |
java.io.File |
getInputDirectory()
Returns the input directory. |
Configuration.KeySorting |
getKeySorting()
Returns the mode of the key sorting. |
Memory |
getMaxMemoryUsage()
Returns the upper bound of memory to use. |
Configuration.ValueSorting |
getValueSorting()
Returns the mode of the value sorting. |
java.io.PrintStream |
printTo(java.io.PrintStream stream)
Prints the content of this object in a human-readable form to the given PrintStream . |
void |
setExpectedNumberOfRecords(long numberOfRecords)
Set the number of records expected to be inserted. |
void |
setIndexDirectory(java.io.File indexDirectory)
Sets the index directory. |
void |
setInputDirectory(java.io.File inputDirectory)
Sets the input directory. |
void |
setKeySorting(Configuration.KeySorting sorting)
Sets the mode of the key sorting. |
void |
setMaxMemoryUsage(Memory maxMemoryUsage)
Sets the maximal amount of memory the index is required to use during indexing. |
void |
setValueSorting(Configuration.ValueSorting sorting)
Sets the mode of the value sorting. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NATIVE_LIB
Constructor Detail |
---|
public Configuration()
setKeySorting(KeySorting)
set to Configuration.KeySorting.UNSORTED
,
setValueSorting(ValueSorting)
set to
Configuration.ValueSorting.DISABLED
, setMaxMemoryUsage(Memory)
set to
Memory.MB1024
and setInputDirectory(File)
and
setIndexDirectory(File)
left empty.
Method Detail |
---|
public long getExpectedNumberOfRecords()
public java.io.File getIndexDirectory()
public java.io.File getInputDirectory()
public Configuration.KeySorting getKeySorting()
public Memory getMaxMemoryUsage()
public Configuration.ValueSorting getValueSorting()
public java.io.PrintStream printTo(java.io.PrintStream stream)
PrintStream
.
stream
- the stream to print to
public void setExpectedNumberOfRecords(long numberOfRecords)
numberOfRecords
- the total number of recordspublic void setIndexDirectory(java.io.File indexDirectory)
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 directorypublic void setInputDirectory(java.io.File inputDirectory)
ManagedIndexer
for
indexing this path specifies the location of the inverted files.
inputDirectory
- the path of the input directorypublic void setKeySorting(Configuration.KeySorting sorting)
sorting
- the key sorting modepublic void setMaxMemoryUsage(Memory maxMemoryUsage)
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 usepublic void setValueSorting(Configuration.ValueSorting sorting)
sorting
- the value sorting mode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |