Class DefaultBlogIndexer
java.lang.Object
fr.paris.lutece.plugins.blog.service.docsearch.DefaultBlogIndexer
- All Implemented Interfaces:
IBlogSearchIndexer
DefaultAnnounceIndexer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the indexer service descriptionstatic org.apache.lucene.document.DocumentgetDocument(Blog blog) Builds a document which will be used by Lucene during the indexing of the announces listgetName()Returns the indexer service nameReturns the indexer service versionbooleanisEnable()Tells whether the service is enable or notvoidprocessIndexing(org.apache.lucene.index.IndexWriter indexWriter, boolean bCreate, StringBuilder sbLogs) add to the index writer the document associate to the key specified in parametervoidupdateDocument(org.apache.lucene.index.IndexWriter indexWriter, Blog blog) Update isArchived field in the index
-
Constructor Details
-
DefaultBlogIndexer
public DefaultBlogIndexer()
-
-
Method Details
-
getDescription
Returns the indexer service description- Specified by:
getDescriptionin interfaceIBlogSearchIndexer- Returns:
- the indexer service description
-
updateDocument
public void updateDocument(org.apache.lucene.index.IndexWriter indexWriter, Blog blog) throws IOException Update isArchived field in the index- Specified by:
updateDocumentin interfaceIBlogSearchIndexer- Throws:
IOException
-
processIndexing
public void processIndexing(org.apache.lucene.index.IndexWriter indexWriter, boolean bCreate, StringBuilder sbLogs) throws IOException, InterruptedException, fr.paris.lutece.portal.service.message.SiteMessageException add to the index writer the document associate to the key specified in parameter- Specified by:
processIndexingin interfaceIBlogSearchIndexer- Parameters:
indexWriter- lucene index writerbCreate- true for indexing all directory false for use incremental indexingsbLogs- the buffer logger- Throws:
IOException- If an IO error occuredInterruptedException- If a thread error occuredfr.paris.lutece.portal.service.message.SiteMessageException- occurs when a site message need to be displayed
-
getDocument
Builds a document which will be used by Lucene during the indexing of the announces list- Parameters:
blog- The blog post- Returns:
- the document
- Throws:
IOException- If an IO Exception occurred
-
getName
Returns the indexer service name- Specified by:
getNamein interfaceIBlogSearchIndexer- Returns:
- the indexer service name
-
getVersion
Returns the indexer service version- Specified by:
getVersionin interfaceIBlogSearchIndexer- Returns:
- the indexer service version
-
isEnable
public boolean isEnable()Tells whether the service is enable or not- Specified by:
isEnablein interfaceIBlogSearchIndexer- Returns:
- true if enable, otherwise false
-