com.rapidtransform.core.search.lucene
Class CompassSearchService
java.lang.Object
com.rapidtransform.core.service.impl.ServiceImpl
com.rapidtransform.core.search.lucene.CompassSearchService
- All Implemented Interfaces:
- SearchService, Service, org.springframework.beans.factory.InitializingBean
public class CompassSearchService
- extends ServiceImpl
- implements SearchService, org.springframework.beans.factory.InitializingBean
- Author:
- Steve Werner
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompassSearchService
public CompassSearchService()
getCompass
public org.compass.core.Compass getCompass()
setCompass
public void setCompass(org.compass.core.Compass compass)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
getCompassTemplate
public org.compass.core.CompassTemplate getCompassTemplate()
search
public java.util.Collection<SearchResult> search(java.lang.String searchType,
SearchCommand searchCommand)
- Searches the Lucene index for matches to the query in the CompassSearchCommand. If the results should
be paginated, the pageSize and currentPage attributes must be set on the SearchCommand. If pageSize and
currentPage are null, then the results will not be paged.
The format for the query follows Lucene's query format. See Lucene documentation for details.
- Specified by:
search
in interface SearchService
- Parameters:
searchType
- The QName of the Meta Type that is being searched. If null, then all types will be searched.
index
public void index()
- Creates the search indexes. If old search indexes exist, they are removed once the
new indexes are created. No system down time is required to re-index since the new
indexes will be swapped in for the old indexes by using the index locks.
- Specified by:
index
in interface SearchService