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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the indexer service descriptionorg.apache.lucene.document.DocumentgetDocument(Document document, String strUrl, String strRole, String strPortletDocumentId) 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.List<org.apache.lucene.document.Document>getDocuments(String strIdDocument) Returns a collection of lucene documents with the same idgetName()Returns the indexer service nameReturns the indexer service versionvoidindex all lucene documentsbooleanisEnable()Tells whether the service is enable or notMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.paris.lutece.portal.service.search.SearchIndexer
getTypeLabel
-
Field Details
-
INDEXER_NAME
- See Also:
-
SHORT_NAME
- See Also:
-
-
Constructor Details
-
DocumentIndexer
public DocumentIndexer()
-
-
Method Details
-
indexDocuments
index all lucene documents- Specified by:
indexDocumentsin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Throws:
IOException- i/o exceptionInterruptedException- 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:
getDocumentsin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Parameters:
strIdDocument- the document id- Returns:
- lucene documents
- Throws:
IOexception- i/o exceptionInterruptedException- interrupted exceptionIOException
-
getName
Returns the indexer service name- Specified by:
getNamein interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- the indexer service name
-
getVersion
Returns the indexer service version- Specified by:
getVersionin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- The indexer service version
-
getDescription
Returns the indexer service description- Specified by:
getDescriptionin interfacefr.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:
isEnablein interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- true if enable, otherwise false
-
getDocument
public 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 indexstrUrl- the url of the documentsstrRole- the lutece role of the page associate to the documentstrPortletDocumentId- the document id concatened to the id portlet with a & in the middle- Returns:
- the built Document
- Throws:
IOException- The IO ExceptionInterruptedException- The InterruptedException
-
getListType
- Specified by:
getListTypein interfacefr.paris.lutece.portal.service.search.SearchIndexer
-
getSpecificSearchAppUrl
- Specified by:
getSpecificSearchAppUrlin interfacefr.paris.lutece.portal.service.search.SearchIndexer
-