|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISearchableDao<T extends CdmBase>
| Method Summary | |
|---|---|
int |
count(Class<? extends T> clazz,
String queryString)
Returns a count of T instances where entities match a given queryString (as interpreted by the Lucene QueryParser) |
void |
optimizeIndex()
Calls optimize on the relevant index (useful periodically to increase response times on the free-text search) |
void |
purgeIndex()
Removes all entities of type T from the index |
void |
rebuildIndex()
Index all T entities currently in the database (useful in concert with purgeIndex() to (re-)create indexes or in the case of corrupt indexes / mismatch between the database and the free-text indices) |
List<T> |
search(Class<? extends T> clazz,
String queryString,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns a List of T instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser) |
String |
suggestQuery(String string)
Suggest a query that will return hits based upon an existing lucene query string (that is presumably misspelt and returns no hits) Used to implement "did you mean?"-type functionality using the lucene spellchecker. |
| Method Detail |
|---|
int count(Class<? extends T> clazz,
String queryString)
clazz - filter the results by class (or pass null to count all entities of type T)queryString -
List<T> search(Class<? extends T> clazz,
String queryString,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
clazz - filter the results by class (or pass null to return all entities of type T)queryString - pageSize - The maximum number of entities returned (can be null for all matching entities)pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints - Supports path like orderHints.propertyNames which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths - properties to be initialized
String suggestQuery(String string)
string - Query string to check
void purgeIndex()
void rebuildIndex()
void optimizeIndex()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||