org.apache.cocoon.components.search
Interface LuceneXMLIndexer

All Superinterfaces:
Component
All Known Implementing Classes:
SimpleLuceneXMLIndexerImpl

public interface LuceneXMLIndexer
extends Component

The avalon behavioural component interface of generating lucene documents from an xml content.

The well-known fields of a lucene documents are defined as *_FIELD constants.

You may access generated lucene documents via allDocuments(), or iterator().

You trigger the generating of lucene documents via build().

Version:
CVS $Id: LuceneXMLIndexer.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Bernhard Huber

Field Summary
static String BODY_FIELD
          A Lucene document field name, containing xml content text of all xml elements.
static String ROLE
          The ROLE name of this avalon component.
static String UID_FIELD
          A Lucene document field name, containg the a unique key of the indexed document.
static String URL_FIELD
          A Lucene document field name, containg the URI/URL of the indexed document.
 
Method Summary
 List build(URL url)
          Build lucene documents from a URL.
 

Field Detail

ROLE

static final String ROLE
The ROLE name of this avalon component.

Its value if the FQN of this interface, ie. org.apache.cocoon.components.search.LuceneXMLIndexer.

Since:
See Also:
Constant Field Values

BODY_FIELD

static final String BODY_FIELD
A Lucene document field name, containing xml content text of all xml elements.

A concrete implementation of this interface SHOULD provides a field named body.

A concrete implementation MAY provide additional lucene document fields.

Since:
See Also:
Constant Field Values

URL_FIELD

static final String URL_FIELD
A Lucene document field name, containg the URI/URL of the indexed document.

A concrete implementation of this interface SHOULD provide a field named url.

Since:
See Also:
Constant Field Values

UID_FIELD

static final String UID_FIELD
A Lucene document field name, containg the a unique key of the indexed document.

This document field is used internally to track document changes, and updates.

A concrete implementation of this interface SHOULD provide a field named uid.

Since:
See Also:
Constant Field Values
Method Detail

build

List build(URL url)
           throws ProcessingException
Build lucene documents from a URL.

This method will read the content of the URL, and generates one or more lucene documents. The generated lucence documents can be fetched using methods allDocuments(), and iterator().

Parameters:
url - the content of this url gets indexed.
Throws:
ProcessingException - Description of Exception
Since:


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.