Package com.jalios.jcms.search
Interface PublicationSearchEngine
- 
- All Known Implementing Classes:
- LucenePublicationSearchEngine
 
 public interface PublicationSearchEngineThis interface must be implemented by publication search engines (indexer and searcher) such as LuceneSearchEngine.- Since:
- jcms-5.5.0
- Author:
- Olivier Jaquemet
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(Publication pub)Method to implement to indexPublicationinto the search engine.voidadd(java.util.Collection<? extends Publication> coll)Method to implement to index aCollectionofPublicationinto the search engine.voiddelete(Publication pub)Method to implement to deletePublicationfrom the search engine.voiddelete(java.util.Collection<? extends Publication> coll)Method to implement to delete aCollectionofPublicationfrom the search engine.java.util.DategetIndexingDate(Publication pub)Method to implement to retrieve the Date at which the specified Publication was indexed in the search engine.java.util.LinkedHashMap<java.lang.String,java.lang.Float>search(QueryHandler qh)Return the list of publication's identifier with a lucene search.booleansearch(QueryHandler qh, java.util.HashSet<? extends Publication> pubSet, QueryResultSet resultSet)Perform a full-text search.voidupdate(Publication pub)Method to implement to updatePublicationin the search engine.voidupdate(java.util.Collection<? extends Publication> coll)Method to implement to updateCollectionofPublicationin the search engine.
 
- 
- 
- 
Method Detail- 
addvoid add(Publication pub) Method to implement to indexPublicationinto the search engine.- Parameters:
- pub- the- Publicationto index .
- Since:
- jcms-5.5.0
 
 - 
updatevoid update(Publication pub) Method to implement to updatePublicationin the search engine.- Parameters:
- pub- the- Publicationto reindex .
- Since:
- jcms-5.5.0
 
 - 
deletevoid delete(Publication pub) Method to implement to deletePublicationfrom the search engine.- Parameters:
- pub- the- Publicationto reindex .
- Since:
- jcms-5.5.0
 
 - 
addvoid add(java.util.Collection<? extends Publication> coll) Method to implement to index aCollectionofPublicationinto the search engine.- Parameters:
- coll- the- Collectionof- Publicationto index .
- Since:
- jcms-5.5.0
 
 - 
updatevoid update(java.util.Collection<? extends Publication> coll) Method to implement to updateCollectionofPublicationin the search engine.- Parameters:
- coll- the- Collectionof- Publicationto reindex .
- Since:
- jcms-5.5.0
 
 - 
deletevoid delete(java.util.Collection<? extends Publication> coll) Method to implement to delete aCollectionofPublicationfrom the search engine.- Parameters:
- coll- the- Collectionof- Publicationto reindex .
- Since:
- jcms-5.5.0
 
 - 
getIndexingDatejava.util.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- Publicationfor which to retrieve the indexing date.
- Returns:
- the indexing date of the publication or null if was not indexed.
- Since:
- jcms-6.0.1
 
 - 
searchboolean search(QueryHandler qh, java.util.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- Publicationto search.
 if empty, search is not performed at all.
 if null, all- Publicationfound will be returned.
 This set MUST NOT be modified by implementation.
- resultSet- the- QueryResultSetthat 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
 
 - 
searchjava.util.LinkedHashMap<java.lang.String,java.lang.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
 
 
- 
 
-