com.jalios.jcms.search
Interface FileSearchEngine

All Known Implementing Classes:
LuceneFileSearchEngine

public interface FileSearchEngine

This interface must be implemented by file search engines such as LuceneFileSearchEngine.

Since:
jcms-3.0
Version:
$Revision: 26222 $
Author:
Olivier Dedieu , Olivier Jaquemet

Field Summary
static String REVISION
           
 
Method Summary
 int getFileCount()
           
 boolean isAvailable()
           
 LinkedHashMap<String,Float> search(QueryHandler qh)
          Return the list of publication's identifier with a lucene search.
 boolean search(QueryHandler qh, HashSet<? extends Publication> pubSet, QueryResultSet resultSet, boolean searchInDB)
          Perform a full-text search on indexed files
 LinkedHashMap<String,Float> search(QueryHandler qh, List<String> idList)
          Filters the given list of publication's identifier with a lucene search.
 

Field Detail

REVISION

static final String REVISION
See Also:
Constant Field Values
Method Detail

search

boolean search(QueryHandler qh,
               HashSet<? extends Publication> pubSet,
               QueryResultSet resultSet,
               boolean searchInDB)
Perform a full-text search on indexed files

Parameters:
qh - the Queryhandler in which to find search text and search options.
pubSet - a HashSet containing all the Publication to search.
if empty, search is not performed at all.
if null, all Publication found will be returned.
This set MUST NOT be modified by implementation.
resultSet - the QueryResultSet that must be filled with matching Publication
searchInDB - if false, only JStore publication are set in pubSet
Returns:
true if a search was performed in the FileSearchEngine. Useful to differenciate a query returning zero result from a query not performed due to missing paramerters (text for example)
Since:
jcms-5.5.0

search

LinkedHashMap<String,Float> search(QueryHandler qh,
                                   List<String> idList)
Filters the given list of publication's identifier with a lucene search.

Parameters:
qh - the Queryhandler in which to find search text and search options.
idList - the list of publication's identifier
Returns:
a map of publication's matching the lucene query and their score. This map is a subset of idList and respect its order.
Since:
jcms-6.2.0

search

LinkedHashMap<String,Float> search(QueryHandler qh)
Return the list of publication's identifier with a lucene search.

Parameters:
qh - the Queryhandler in which to find search text and search options.
Returns:
a map of publication's matching the lucene query and their score.
Since:
jcms-6.2.0

getFileCount

int getFileCount()
Returns:
the number of indexed files
Since:
jcms-4.1

isAvailable

boolean isAvailable()
Returns:
true if the FileSearchEngine is available
Since:
jcms-4.1


Copyright © 2001-2010 Jalios SA. All Rights Reserved.