Class DefaultBlogIndexer

java.lang.Object
fr.paris.lutece.plugins.blog.service.docsearch.DefaultBlogIndexer
All Implemented Interfaces:
IBlogSearchIndexer

public class DefaultBlogIndexer extends Object implements IBlogSearchIndexer
DefaultAnnounceIndexer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the indexer service description
    static org.apache.lucene.document.Document
    Builds a document which will be used by Lucene during the indexing of the announces list
    Returns the indexer service name
    Returns the indexer service version
    boolean
    Tells whether the service is enable or not
    void
    processIndexing(org.apache.lucene.index.IndexWriter indexWriter, boolean bCreate, StringBuilder sbLogs)
    add to the index writer the document associate to the key specified in parameter
    void
    updateDocument(org.apache.lucene.index.IndexWriter indexWriter, Blog blog)
    Update isArchived field in the index

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultBlogIndexer

      public DefaultBlogIndexer()
  • Method Details

    • getDescription

      public String getDescription()
      Returns the indexer service description
      Specified by:
      getDescription in interface IBlogSearchIndexer
      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:
      updateDocument in interface IBlogSearchIndexer
      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:
      processIndexing in interface IBlogSearchIndexer
      Parameters:
      indexWriter - lucene index writer
      bCreate - true for indexing all directory false for use incremental indexing
      sbLogs - the buffer logger
      Throws:
      IOException - If an IO error occured
      InterruptedException - If a thread error occured
      fr.paris.lutece.portal.service.message.SiteMessageException - occurs when a site message need to be displayed
    • getDocument

      public static org.apache.lucene.document.Document getDocument(Blog blog) throws IOException
      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

      public String getName()
      Returns the indexer service name
      Specified by:
      getName in interface IBlogSearchIndexer
      Returns:
      the indexer service name
    • getVersion

      public String getVersion()
      Returns the indexer service version
      Specified by:
      getVersion in interface IBlogSearchIndexer
      Returns:
      the indexer service version
    • isEnable

      public boolean isEnable()
      Tells whether the service is enable or not
      Specified by:
      isEnable in interface IBlogSearchIndexer
      Returns:
      true if enable, otherwise false