fr.paris.lutece.plugins.document.service.search
Class DocumentIndexer

java.lang.Object
  extended by fr.paris.lutece.plugins.document.service.search.DocumentIndexer
All Implemented Interfaces:
fr.paris.lutece.portal.service.search.SearchIndexer

public class DocumentIndexer
extends java.lang.Object
implements fr.paris.lutece.portal.service.search.SearchIndexer

Document Indexer


Constructor Summary
DocumentIndexer()
           
 
Method Summary
 java.lang.String getDescription()
          Returns the indexer service description
static org.apache.lucene.document.Document getDocument(Document document, java.lang.String strUrl)
          Builds a document which will be used by Lucene during the indexing of the pages of the site with the following fields : summary, uid, url, contents, title and description.
 java.util.List<org.apache.lucene.document.Document> getDocuments()
          Returns a collection of lucene documents to add to the index
 java.lang.String getName()
          Returns the indexer service name
 java.lang.String getVersion()
          Returns the indexer service version
 boolean isEnable()
          Tells whether the service is enable or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentIndexer

public DocumentIndexer()
Method Detail

getDocuments

public java.util.List<org.apache.lucene.document.Document> getDocuments()
                                                                 throws java.io.IOException,
                                                                        java.lang.InterruptedException
Returns a collection of lucene documents to add to the index

Specified by:
getDocuments in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
A collection of lucene documents to add to the index
Throws:
java.io.IOException
java.lang.InterruptedException

getName

public java.lang.String getName()
Returns the indexer service name

Specified by:
getName in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
the indexer service name

getVersion

public java.lang.String getVersion()
Returns the indexer service version

Specified by:
getVersion in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
The indexer service version

getDescription

public java.lang.String getDescription()
Returns the indexer service description

Specified by:
getDescription in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
The indexer service description

isEnable

public boolean isEnable()
Tells whether the service is enable or not

Specified by:
isEnable in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
true if enable, otherwise false

getDocument

public static org.apache.lucene.document.Document getDocument(Document document,
                                                              java.lang.String strUrl)
                                                       throws java.io.IOException,
                                                              java.lang.InterruptedException
Builds a document which will be used by Lucene during the indexing of the pages of the site with the following fields : summary, uid, url, contents, title and description.

Parameters:
page - the page to index
strUrl - the url of the documents
Returns:
the built Document
Throws:
java.io.IOException - The IO Exception
java.lang.InterruptedException - The InterruptedException


Copyright © 2007 Mairie de Paris. All Rights Reserved.