Class DocSearchService
- java.lang.Object
-
- fr.paris.lutece.plugins.document.service.docsearch.DocSearchService
-
public class DocSearchService extends Object
DocumentSearchService
-
-
Field Summary
Fields Modifier and Type Field Description static StringPARAM_FORCINGstatic StringPATH_INDEXstatic StringPATTERN_DATE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIndexerAction(int nIdDocument, int nIdTask)Add Indexer Action to perform on a recordList<IndexerAction>getAllIndexerActionByTask(int nIdTask)return a list of IndexerAction by task keystatic DocSearchServicegetInstance()The singletonList<DocSearchItem>getSearchResults(String strQuery, boolean bTitle, boolean bSummary, String date, DocumentType documentType)Return advanced search resultsList<DocSearchItem>getSearchResults(String strQuery, int nStartIndex, fr.paris.lutece.portal.business.user.AdminUser user)Return search resultsStringprocessIndexing(boolean bCreate)Indexing documents for searchingstatic voidremoveAllIndexerAction()Remove all Indexer ActionvoidremoveIndexerAction(int nIdAction)Remove a Indexer Action
-
-
-
Field Detail
-
PATH_INDEX
public static final String PATH_INDEX
- See Also:
- Constant Field Values
-
PARAM_FORCING
public static final String PARAM_FORCING
- See Also:
- Constant Field Values
-
PATTERN_DATE
public static final String PATTERN_DATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static DocSearchService getInstance()
The singleton- Returns:
- instance of DocSearchService
-
processIndexing
public String processIndexing(boolean bCreate)
Indexing documents for searching- Parameters:
bCreate- tell if it's total indexing or total (total = true)- Returns:
- indexing logs
-
getSearchResults
public List<DocSearchItem> getSearchResults(String strQuery, int nStartIndex, fr.paris.lutece.portal.business.user.AdminUser user)
Return search results- Parameters:
strQuery- The search querynStartIndex- The start indexuser- The user- Returns:
- Results as a collection of SarchItem
-
getSearchResults
public List<DocSearchItem> getSearchResults(String strQuery, boolean bTitle, boolean bSummary, String date, DocumentType documentType)
Return advanced search results- Parameters:
strQuery- The search querybTitle- true for query in titlebSummary- true for query in summarydate- for filtering the result by datedocumentType- for filtering the result by type- Returns:
- Results as a collection of SarchItem
-
getAllIndexerActionByTask
public List<IndexerAction> getAllIndexerActionByTask(int nIdTask)
return a list of IndexerAction by task key- Parameters:
nIdTask- the task key- Returns:
- a list of IndexerAction
-
removeIndexerAction
public void removeIndexerAction(int nIdAction)
Remove a Indexer Action- Parameters:
nIdAction- the key of the action to remove
-
removeAllIndexerAction
public static void removeAllIndexerAction()
Remove all Indexer Action
-
addIndexerAction
public void addIndexerAction(int nIdDocument, int nIdTask)Add Indexer Action to perform on a record- Parameters:
nIdDocument- the document idnIdTask- the key of the action to do
-
-