Luigi Homepage

net.cw.luigi.index
Interface DocumentBuilder

All Known Implementing Classes:
ReflectiveBuilder

public interface DocumentBuilder

This builder helps creating and updating indexes by mapping regular POJOs to Lucene data types like Document and Term. It is assumed that an Object will have a key value that can be used to uniquely identify the document described by it.

Version:
$Revision: 1.1 $
Author:
Tiago Silveira

Method Summary
 Document build(Object searchable)
          Builds a document for the object.
 Term keyTerm(Object searchable)
          Gives the Term that uniquely identifies the objet in an index.
 

Method Detail

build

Document build(Object searchable)
Builds a document for the object. The argument must be not null .

Parameters:
searchable - the target searchable object
Returns:
a Lucene document

keyTerm

Term keyTerm(Object searchable)
Gives the Term that uniquely identifies the objet in an index. The argument must be not null .

Parameters:
searchable - the target searchable object
Returns:
the Lucene Term that identifies this object in the index

Luigi Homepage