public class DefaultAnnounceIndexer extends Object implements IAnnounceSearchIndexer
Constructor and Description |
---|
DefaultAnnounceIndexer() |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns the indexer service description
|
static org.apache.lucene.document.Document |
getDocument(Announce announce,
String strUrl,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Builds a document which will be used by Lucene during the indexing of the announces list
|
static List<org.apache.lucene.document.Document> |
getDocuments(String strDocument)
Get the subject document
|
String |
getName()
Returns the indexer service name
|
String |
getVersion()
Returns the indexer service version
|
boolean |
isEnable()
Tells whether the service is enable or not
|
void |
processIndexing(org.apache.lucene.index.IndexWriter indexWriter,
boolean bCreate,
StringBuffer sbLogs)
add to the index writer the document associate to the key specified in parameter
|
public String getDescription()
getDescription
in interface IAnnounceSearchIndexer
public void processIndexing(org.apache.lucene.index.IndexWriter indexWriter, boolean bCreate, StringBuffer sbLogs) throws IOException, InterruptedException, fr.paris.lutece.portal.service.message.SiteMessageException
processIndexing
in interface IAnnounceSearchIndexer
indexWriter
- lucene index writerbCreate
- true for indexing all directory false for use incremental indexingsbLogs
- the buffer loggerIOException
- If an IO error occuredInterruptedException
- If a thread error occuredfr.paris.lutece.portal.service.message.SiteMessageException
- occurs when a site message need to be displayedpublic static List<org.apache.lucene.document.Document> getDocuments(String strDocument) throws IOException, InterruptedException, fr.paris.lutece.portal.service.message.SiteMessageException
strDocument
- id of the subject to indexIOException
- If an IO Exception occurredInterruptedException
- If the indexer is interruptedfr.paris.lutece.portal.service.message.SiteMessageException
- the exceptionpublic static org.apache.lucene.document.Document getDocument(Announce announce, String strUrl, fr.paris.lutece.portal.service.plugin.Plugin plugin) throws IOException, InterruptedException
announce
- the announcestrUrl
- the urlplugin
- the pluginIOException
- If an IO Exception occurredInterruptedException
- If the indexer is interruptedpublic String getName()
getName
in interface IAnnounceSearchIndexer
public String getVersion()
getVersion
in interface IAnnounceSearchIndexer
public boolean isEnable()
isEnable
in interface IAnnounceSearchIndexer
Copyright © 2019 City of Paris. All rights reserved.