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 java.lang.Object implements fr.paris.lutece.portal.service.search.SearchIndexerDocument Indexer
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringINDEXER_NAMEstatic java.lang.StringSHORT_NAME
-
Constructor Summary
Constructors Constructor Description DocumentIndexer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Returns the indexer service descriptionstatic org.apache.lucene.document.DocumentgetDocument(Document document, java.lang.String strUrl, java.lang.String strRole, java.lang.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.java.util.List<org.apache.lucene.document.Document>getDocuments(java.lang.String strIdDocument)Returns a collection of lucene documents with the same idjava.util.List<java.lang.String>getListType()java.lang.StringgetName()Returns the indexer service namejava.lang.StringgetSpecificSearchAppUrl()java.lang.StringgetVersion()Returns the indexer service versionvoidindexDocuments()index all lucene documentsbooleanisEnable()Tells whether the service is enable or not
-
-
-
Field Detail
-
INDEXER_NAME
public static final java.lang.String INDEXER_NAME
- See Also:
- Constant Field Values
-
SHORT_NAME
public static final java.lang.String SHORT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
indexDocuments
public void indexDocuments() throws java.io.IOException, java.lang.InterruptedExceptionindex all lucene documents- Specified by:
indexDocumentsin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Throws:
java.io.IOException- i/o exceptionjava.lang.InterruptedException- interrupted exception
-
getDocuments
public java.util.List<org.apache.lucene.document.Document> getDocuments(java.lang.String strIdDocument) throws java.io.IOException, java.lang.InterruptedExceptionReturns 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 exceptionjava.lang.InterruptedException- interrupted exceptionjava.io.IOException
-
getName
public java.lang.String getName()
Returns the indexer service name- Specified by:
getNamein interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- the indexer service name
-
getVersion
public java.lang.String getVersion()
Returns the indexer service version- Specified by:
getVersionin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- The indexer service version
-
getDescription
public java.lang.String 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 static org.apache.lucene.document.Document getDocument(Document document, java.lang.String strUrl, java.lang.String strRole, java.lang.String strPortletDocumentId) throws java.io.IOException, java.lang.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:
java.io.IOException- The IO Exceptionjava.lang.InterruptedException- The InterruptedException
-
getListType
public java.util.List<java.lang.String> getListType()
- Specified by:
getListTypein interfacefr.paris.lutece.portal.service.search.SearchIndexer
-
getSpecificSearchAppUrl
public java.lang.String getSpecificSearchAppUrl()
- Specified by:
getSpecificSearchAppUrlin interfacefr.paris.lutece.portal.service.search.SearchIndexer
-
-