fr.paris.lutece.plugins.document.service.docsearch
Class DocSearchService

java.lang.Object
  extended by fr.paris.lutece.plugins.document.service.docsearch.DocSearchService

public class DocSearchService
extends java.lang.Object

DocumentSearchService


Field Summary
static java.lang.String PARAM_FORCING
           
static java.lang.String PATH_INDEX
           
static java.lang.String PATTERN_DATE
           
 
Method Summary
 void addIndexerAction(int nIdDocument, int nIdTask)
          Add Indexer Action to perform on a record
 java.util.List<IndexerAction> getAllIndexerActionByTask(int nIdTask)
          return a list of IndexerAction by task key
static DocSearchService getInstance()
          The singleton
 java.util.List<DocSearchItem> getSearchResults(java.lang.String strQuery, boolean bTitle, boolean bSummary, java.lang.String date, DocumentType documentType)
          Return advanced search results
 java.util.List<DocSearchItem> getSearchResults(java.lang.String strQuery, int nStartIndex, fr.paris.lutece.portal.business.user.AdminUser user)
          Return search results
 java.lang.String processIndexing(boolean bCreate)
          Indexing documents for searching
static void removeAllIndexerAction()
          Remove all Indexer Action
 void removeIndexerAction(int nIdAction)
          Remove a Indexer Action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_INDEX

public static final java.lang.String PATH_INDEX
See Also:
Constant Field Values

PARAM_FORCING

public static final java.lang.String PARAM_FORCING
See Also:
Constant Field Values

PATTERN_DATE

public static final java.lang.String PATTERN_DATE
See Also:
Constant Field Values
Method Detail

getInstance

public static DocSearchService getInstance()
The singleton

Returns:
instance of DocSearchService

processIndexing

public java.lang.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 java.util.List<DocSearchItem> getSearchResults(java.lang.String strQuery,
                                                      int nStartIndex,
                                                      fr.paris.lutece.portal.business.user.AdminUser user)
Return search results

Parameters:
strQuery - The search query
nStartIndex - The start index
user - The user
Returns:
Results as a collection of SarchItem

getSearchResults

public java.util.List<DocSearchItem> getSearchResults(java.lang.String strQuery,
                                                      boolean bTitle,
                                                      boolean bSummary,
                                                      java.lang.String date,
                                                      DocumentType documentType)
Return advanced search results

Parameters:
strQuery - The search query
bTitle - true for query in title
bSummary - true for query in summary
date - for filtering the result by date
documentType - for filtering the result by type
Returns:
Results as a collection of SarchItem

getAllIndexerActionByTask

public java.util.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 id
nIdTask - the key of the action to do


Copyright © 2010 Mairie de Paris. All Rights Reserved.