public class HibernateSearchJpaTools extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
HibernateSearchJpaTools() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.lucene.search.Query |
generateQuery(String searchTerm,
Class searchedEntity,
javax.persistence.EntityManager entityManager,
org.apache.lucene.analysis.Analyzer defaultAnalyzer)
Generates a lucene query to search for a given term in all the indexed fields of a class
|
static void |
reindex(Class clazz,
javax.persistence.EntityManager entityManager)
Regenerates the index for a given class
|
static void |
reindexAll(boolean async,
javax.persistence.EntityManager entityManager)
Regenerates all the indexed class indexes
|
public static org.apache.lucene.search.Query generateQuery(String searchTerm, Class searchedEntity, javax.persistence.EntityManager entityManager, org.apache.lucene.analysis.Analyzer defaultAnalyzer) throws org.apache.lucene.queryParser.ParseException
searchTerm - the term to search forsearchedEntity - the class searchedentityManager - the entity managerdefaultAnalyzer - the default analyzer for parsing the search termsorg.apache.lucene.queryParser.ParseExceptionpublic static void reindex(Class clazz, javax.persistence.EntityManager entityManager)
clazz - the classentityManager - the entity managerpublic static void reindexAll(boolean async,
javax.persistence.EntityManager entityManager)
async - true if the reindexing will be done as a background threadentityManager - the entity managerCopyright © 2003-2012. All Rights Reserved.