Class DocumentIndexer

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

public class DocumentIndexer extends Object implements fr.paris.lutece.portal.service.search.SearchIndexer
Document Indexer
  • Field Details

  • Constructor Details

    • DocumentIndexer

      public DocumentIndexer()
  • Method Details

    • indexDocuments

      public void indexDocuments() throws IOException, InterruptedException
      index all lucene documents
      Specified by:
      indexDocuments in interface fr.paris.lutece.portal.service.search.SearchIndexer
      Throws:
      IOException - i/o exception
      InterruptedException - interrupted exception
    • getDocuments

      public List<org.apache.lucene.document.Document> getDocuments(String strIdDocument) throws IOException, InterruptedException
      Returns a collection of lucene documents with the same id
      Specified by:
      getDocuments in interface fr.paris.lutece.portal.service.search.SearchIndexer
      Parameters:
      strIdDocument - the document id
      Returns:
      lucene documents
      Throws:
      IOexception - i/o exception
      InterruptedException - interrupted exception
      IOException
    • getName

      public 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 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 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, String strUrl, String strRole, String strPortletDocumentId) throws IOException, 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:
      document - the document to index
      strUrl - the url of the documents
      strRole - the lutece role of the page associate to the document
      strPortletDocumentId - the document id concatened to the id portlet with a & in the middle
      Returns:
      the built Document
      Throws:
      IOException - The IO Exception
      InterruptedException - The InterruptedException
    • getListType

      public List<String> getListType()
      Specified by:
      getListType in interface fr.paris.lutece.portal.service.search.SearchIndexer
    • getSpecificSearchAppUrl

      public String getSpecificSearchAppUrl()
      Specified by:
      getSpecificSearchAppUrl in interface fr.paris.lutece.portal.service.search.SearchIndexer