de::aitools::aq::invertedindex::core::Indexer< V extends Value > Class Reference

List of all members.

Public Member Functions

void close ()
void setExpectedNumberOfRecords (long numberOfRecords)
Properties index ()

Static Public Member Functions

static< VextendsValue >
Indexer< V > 
open (Class< V > clazz, Configuration config)

Protected Member Functions

void finalize () throws Throwable

Static Package Functions

 [static initializer]

Private Member Functions

 Indexer (Pointer nativeIndexer)

Detailed Description

A class to build an inverted index programmatically from a number of records. The created index is static and read-only.

Author:
martin.trenkmann@uni-weimar.de
Version:
Id
Indexer.java,v 1.8 2011/04/18 19:57:36 trenkman Exp

Definition at line 23 of file Indexer.java.


Constructor & Destructor Documentation

de::aitools::aq::invertedindex::core::Indexer< V extends Value >::Indexer ( Pointer  nativeIndexer  )  [inline, private]

Initializes this instance with an JNA Pointer, that refers to the native equivalent.

Parameters:
nativeIndexer a pointer to the native indexer

Definition at line 69 of file Indexer.java.


Member Function Documentation

de::aitools::aq::invertedindex::core::Indexer< V extends Value >::[static initializer] (  )  [inline, static, package]
void de::aitools::aq::invertedindex::core::Indexer< V extends Value >::close (  )  [inline]

Closes and deletes the native index. This method is redundant to a successful call of index(), which even closes the index. However, you can use this method in some cleanup code, if your code interrupts abnormally during the put(Record) phase.

Definition at line 80 of file Indexer.java.

void de::aitools::aq::invertedindex::core::Indexer< V extends Value >::finalize (  )  throws Throwable [inline, protected]

Definition at line 103 of file Indexer.java.

Properties de::aitools::aq::invertedindex::core::Indexer< V extends Value >::index (  )  [inline]

Starts the final indexing process. This method has to be called at the very end of a sequence of put(Record) or put(String, Value) requests. Afterwards the native indexer will be closed and deleted automatically, and is not usable any longer.

Please note, depending of the number of inserted records this method can take a while, so be patient and enjoy the console output ...

Returns:
a Properties object with some information about the created index.
See also:
put(Record)
put(String, Value)

Definition at line 123 of file Indexer.java.

References de::aitools::aq::invertedindex::core::Properties::impl.

static <VextendsValue> Indexer<V> de::aitools::aq::invertedindex::core::Indexer< V extends Value >::open ( Class< V >  clazz,
Configuration  config 
) [inline, static]

Instantiates a new writable inverted index in a dedicated directory, that can be filled programmatically with a (huge) number of records.

Please read the documentation to setup the Configuration object properly. In contrast to ManagedIndexer this indexing method provides Unicode support and allows whitespaces (no tabs) in key and value strings.

The configuration parameter required for this job are:

Parameters:
<V> the value type parameter
clazz the class object of the value type
config the indexing job configuration
Returns:
an instance of Indexer ready to write

Definition at line 54 of file Indexer.java.

References de::aitools::aq::invertedindex::core::Configuration::impl.

void de::aitools::aq::invertedindex::core::Indexer< V extends Value >::setExpectedNumberOfRecords ( long  numberOfRecords  )  [inline]

A tuning method to indicate the expected number of records to be inserted to the indexer. Estimating such upper bound in an early stage of put(Record) or put(String, Value) requests can increase the indexing performance dramatically.

Note that this value is only a hint and works only if KeySorting#UNSORTED is used. A wrong estimation definitely has no negative impact to the indexing behavior.

Parameters:
numberOfRecords some upper bound of records to be inserted
See also:
Configuration::setExpectedNumberOfRecords(long)

Definition at line 98 of file Indexer.java.


The documentation for this class was generated from the following file:
Generated on Wed May 30 15:07:45 2012 by  doxygen 1.6.3