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 java.lang.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
 java.util.List<IndexerAction> getAllIndexerActionByTask(int nIdTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          return a list of IndexerAction by task key
 java.lang.String getAutocompleteResult(javax.servlet.http.HttpServletRequest request)
           
static DirectorySearchService getInstance()
           
 org.apache.lucene.search.Searcher getSearcher()
          return searcher
 java.util.List<java.lang.Integer> getSearchResults(Directory directory, java.util.HashMap<java.lang.String,java.util.List<RecordField>> mapSearch, RecordFieldFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Return a list of record key return by the search
 java.lang.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 java.util.List<java.lang.Integer> getSearchResults(Directory directory,
                                                          java.util.HashMap<java.lang.String,java.util.List<RecordField>> mapSearch,
                                                          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
filter - the filter
plugin - the plugin
Returns:
a list of record key return by the search

getAutocompleteResult

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

processIndexing

public java.lang.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 java.util.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 © 2010 Mairie de Paris. All Rights Reserved.