fr.paris.lutece.plugins.directory.service.directorysearch
Class DirectorySearchService

java.lang.Object
  extended by fr.paris.lutece.plugins.directory.service.directorysearch.DirectorySearchService

public class DirectorySearchService
extends Object

DirectorySearchService


Constructor Summary
DirectorySearchService()
          Creates a new instance of DirectorySearchService
 
Method Summary
 void addIndexerAction(int nIdRecord, int nIdTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Add Indexer Action to perform on a record
 List<IndexerAction> getAllIndexerActionByTask(int nIdTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          return a list of IndexerAction by task key
 String getAutocompleteResult(javax.servlet.http.HttpServletRequest request)
           
static DirectorySearchService getInstance()
           
 org.apache.lucene.search.Searcher getSearcher()
          return searcher
 List<Integer> getSearchResults(Directory directory, HashMap<String,List<RecordField>> mapSearch, Date dateCreation, Date dateCreationBegin, Date dateCreationEnd, Date dateModification, Date dateModificationBegin, Date dateModificationEnd, RecordFieldFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return a list of record key return by the search
 List<Integer> getSearchResults(Directory directory, HashMap<String,List<RecordField>> mapSearch, Date dateCreation, Date dateCreationBegin, Date dateCreationEnd, RecordFieldFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return a list of record key return by the search
 String processIndexing(boolean bCreate)
          Process indexing
 void removeIndexerAction(int nIdAction, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a Indexer Action
 void setSearcher(org.apache.lucene.search.Searcher searcher)
          set searcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectorySearchService

public DirectorySearchService()
Creates a new instance of DirectorySearchService

Method Detail

getInstance

public static DirectorySearchService getInstance()
Returns:
singleton

getSearchResults

public List<Integer> getSearchResults(Directory directory,
                                      HashMap<String,List<RecordField>> mapSearch,
                                      Date dateCreation,
                                      Date dateCreationBegin,
                                      Date dateCreationEnd,
                                      RecordFieldFilter filter,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return a list of record key return by the search

Parameters:
directory - the directory
mapSearch - a map which contains for each entry the list of recorField(value of field search) associate
dateCreation - the creation date
dateCreationBegin - the date begin to search for the creation date
dateCreationEnd - the date end to search for the creation date
filter - the filter
plugin - the plugin
Returns:
a list of record key return by the search

getSearchResults

public List<Integer> getSearchResults(Directory directory,
                                      HashMap<String,List<RecordField>> mapSearch,
                                      Date dateCreation,
                                      Date dateCreationBegin,
                                      Date dateCreationEnd,
                                      Date dateModification,
                                      Date dateModificationBegin,
                                      Date dateModificationEnd,
                                      RecordFieldFilter filter,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return a list of record key return by the search

Parameters:
directory - the directory
mapSearch - a map which contains for each entry the list of recorField(value of field search) associate
dateCreation - the creation date
dateCreationBegin - the date begin to search for the creation date
dateCreationEnd - the date end to search for the creation date
dateModification - the modification date
dateModificationBegin - the date begin to search for the modification date
dateModificationEnd - the date end to search for the modification date
filter - the filter
plugin - the plugin
Returns:
a list of record key return by the search

getAutocompleteResult

public String getAutocompleteResult(javax.servlet.http.HttpServletRequest request)
                             throws Exception
Throws:
Exception

processIndexing

public String processIndexing(boolean bCreate)
Process indexing

Parameters:
bCreate - true for start full indexing false for begin incremental indexing
Returns:
the log

addIndexerAction

public void addIndexerAction(int nIdRecord,
                             int nIdTask,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Add Indexer Action to perform on a record

Parameters:
nIdRecord - the id of the record
nIdTask - the key of the action to do
plugin - the plugin

removeIndexerAction

public void removeIndexerAction(int nIdAction,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a Indexer Action

Parameters:
nIdAction - the key of the action to remove
plugin - the plugin

getAllIndexerActionByTask

public List<IndexerAction> getAllIndexerActionByTask(int nIdTask,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
return a list of IndexerAction by task key

Parameters:
nIdTask - the task kety
plugin - the plugin
Returns:
a list of IndexerAction

getSearcher

public org.apache.lucene.search.Searcher getSearcher()
return searcher

Returns:
searcher

setSearcher

public void setSearcher(org.apache.lucene.search.Searcher searcher)
set searcher

Parameters:
searcher - searcher


Copyright © 2013 Mairie de Paris. All Rights Reserved.