Class HelpdeskIndexer
java.lang.Object
fr.paris.lutece.plugins.helpdesk.service.search.HelpdeskIndexer
- All Implemented Interfaces:
fr.paris.lutece.portal.service.search.SearchIndexer
public class HelpdeskIndexer
extends Object
implements fr.paris.lutece.portal.service.search.SearchIndexer
Helpdesk Indexer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the indexer service descriptionstatic org.apache.lucene.document.DocumentgetDocument(int nIdFaq, QuestionAnswer questionAnswer, String strUrl, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Builds a document which will be used by Lucene during the indexing of the question/answer liststatic org.apache.lucene.document.DocumentgetDocument(Subject subject, String strRoleKey, String strUrl, fr.paris.lutece.portal.service.plugin.Plugin plugin) Builds a document which will be used by Lucene during the indexing of the subject listList<org.apache.lucene.document.Document>getDocuments(String strDocument) Get the subject documentgetName()Get the name of the indexer.Get the version of the indexervoidIndex all documentsvoidindexSubject(Faq faq, Subject subject) Recursive method for indexing a subject and his childrenbooleanisEnable()Get the state of indexer
-
Field Details
-
PROPERTY_INDEXER_NAME
- See Also:
-
SHORT_NAME_SUBJECT
- See Also:
-
SHORT_NAME_QUESTION_ANSWER
- See Also:
-
-
Constructor Details
-
HelpdeskIndexer
public HelpdeskIndexer()
-
-
Method Details
-
getDescription
Returns the indexer service description- Specified by:
getDescriptionin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- The indexer service description
-
indexDocuments
public void indexDocuments() throws IOException, InterruptedException, fr.paris.lutece.portal.service.message.SiteMessageExceptionIndex all documents- Specified by:
indexDocumentsin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Throws:
IOException- the exceptionInterruptedException- the exceptionfr.paris.lutece.portal.service.message.SiteMessageException- the exception
-
indexSubject
Recursive method for indexing a subject and his children- Parameters:
faq- the faq linked to the subjectsubject- the subject- Throws:
IOException- I/O ExceptionInterruptedException- interruptedException
-
getDocuments
public List<org.apache.lucene.document.Document> getDocuments(String strDocument) throws IOException, InterruptedException, fr.paris.lutece.portal.service.message.SiteMessageException Get the subject document- Specified by:
getDocumentsin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Parameters:
strDocument- id of the subject to index- Returns:
- The list of lucene documents
- Throws:
IOException- the exceptionInterruptedException- the exceptionfr.paris.lutece.portal.service.message.SiteMessageException- the exception
-
getDocument
public static org.apache.lucene.document.Document getDocument(int nIdFaq, QuestionAnswer questionAnswer, String strUrl, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) throws IOException, InterruptedException Builds a document which will be used by Lucene during the indexing of the question/answer list- Parameters:
nIdFaq- TheFaqIdquestionAnswer- theQuestionAnswerto indexstrUrl- the url of the subjectstrRoleKey- The role keyplugin- ThePlugin- Returns:
- A Lucene
Documentcontaining QuestionAnswer Data - Throws:
IOException- The IO ExceptionInterruptedException- The InterruptedException
-
getDocument
public static org.apache.lucene.document.Document getDocument(Subject subject, String strRoleKey, String strUrl, fr.paris.lutece.portal.service.plugin.Plugin plugin) throws IOException, InterruptedException Builds a document which will be used by Lucene during the indexing of the subject list- Parameters:
subject- theSubjectto indexstrUrl- the url of the subjectstrRoleKey- The role keyplugin- ThePlugin- Returns:
- The Lucene
Documentcontaining Subject data - Throws:
IOException- The IO ExceptionInterruptedException- The InterruptedException
-
getName
Get the name of the indexer.- Specified by:
getNamein interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- The name
-
getVersion
Get the version of the indexer- Specified by:
getVersionin interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- The version number
-
isEnable
public boolean isEnable()Get the state of indexer- Specified by:
isEnablein interfacefr.paris.lutece.portal.service.search.SearchIndexer- Returns:
- Return true if the indexer is enabled, false else.
-
getListType
- Specified by:
getListTypein interfacefr.paris.lutece.portal.service.search.SearchIndexer
-
getSpecificSearchAppUrl
- Specified by:
getSpecificSearchAppUrlin interfacefr.paris.lutece.portal.service.search.SearchIndexer
-