com.jalios.jcms.search
Interface PublicationSearchEngine

All Known Implementing Classes:
LucenePublicationSearchEngine

public interface PublicationSearchEngine

This interface must be implemented by publication search engines (indexer and searcher) such as LuceneSearchEngine.

Since:
jcms-5.5.0
Version:
$Revision: 25672 $
Author:
Olivier Jaquemet

Field Summary
static String REVISION
           
 
Method Summary
 void add(Collection<? extends Publication> coll)
          Method to implement to index a Collection of Publication into the search engine.
 void add(Publication pub)
          Method to implement to index Publication into the search engine.
 void clearAll()
          Method to implement to clear all Publication from the search engine.
 void delete(Collection<? extends Publication> coll)
          Method to implement to delete a Collection of Publication from the search engine.
 void delete(Publication pub)
          Method to implement to delete Publication from the search engine.
 Date getIndexingDate(Publication pub)
          Method to implement to retrieve the Date at which the specified Publication was indexed in the search engine.
 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)
          Perform a full-text search.
 LinkedHashMap<String,Float> search(QueryHandler qh, List<String> idList)
          Filters the given list of publication's identifier with a lucene search.
 void update(Collection<? extends Publication> coll)
          Method to implement to update Collection of Publication in the search engine.
 void update(Publication pub)
          Method to implement to update Publication in the search engine.
 

Field Detail

REVISION

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

add

void add(Publication pub)
Method to implement to index Publication into the search engine.

Parameters:
pub - the Publication to index .
Since:
jcms-5.5.0

update

void update(Publication pub)
Method to implement to update Publication in the search engine.

Parameters:
pub - the Publication to reindex .
Since:
jcms-5.5.0

delete

void delete(Publication pub)
Method to implement to delete Publication from the search engine.

Parameters:
pub - the Publication to reindex .
Since:
jcms-5.5.0

add

void add(Collection<? extends Publication> coll)
Method to implement to index a Collection of Publication into the search engine.

Parameters:
coll - the Collection of Publication to index .
Since:
jcms-5.5.0

update

void update(Collection<? extends Publication> coll)
Method to implement to update Collection of Publication in the search engine.

Parameters:
coll - the Collection of Publication to reindex .
Since:
jcms-5.5.0

delete

void delete(Collection<? extends Publication> coll)
Method to implement to delete a Collection of Publication from the search engine.

Parameters:
coll - the Collection of Publication to reindex .
Since:
jcms-5.5.0

getIndexingDate

Date getIndexingDate(Publication pub)
Method to implement to retrieve the Date at which the specified Publication was indexed in the search engine.

Parameters:
pub - the Publication for which to retrieve the indexing date.
Returns:
the indexing date of the publication or null if was not indexed.
Since:
jcms-6.0.1

clearAll

void clearAll()
Method to implement to clear all Publication from the search engine.

Since:
jcms-5.5.0

search

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

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
Returns:
true if a search was performed in the PublicationSearchEngine. 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.0.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.1.2


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