|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.search.sandbox.standalone.LuceneFullTextManager
public class LuceneFullTextManager
Implements a standalone full text service. Data is stored in Lucene
Method Summary | ||
---|---|---|
FullTextQuery |
createFullTextQuery(org.apache.lucene.search.Query luceneQuery,
Class<?>... entities)
Create a fulltext query on top of a native Lucene query returning the matching objects of type entities and their respective subclasses. |
|
void |
flushToIndexes()
Flush all index changes forcing Hibernate Search to apply all changes to the index not waiting for the batch limit. |
|
|
get(Class<T> entityType,
Serializable id)
Returns the entity instance of a given type and id value |
|
SearchFactory |
getSearchFactory()
|
|
|
index(T entity)
(Re-)index an entity. |
|
|
purge(Class<T> entityType,
Serializable id)
Remove the entity with the type entityType and the identifier id from the index. |
|
|
purgeAll(Class<T> entityType)
Remove all entities from of particular class and all its subclasses from the index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public <T> T get(Class<T> entityType, Serializable id)
FullTextManager
get
in interface FullTextManager
public FullTextQuery createFullTextQuery(org.apache.lucene.search.Query luceneQuery, Class<?>... entities)
FullTextManager
entities
and their respective subclasses.
createFullTextQuery
in interface FullTextManager
luceneQuery
- The native Lucene query to be rn against the Lucene index.entities
- List of classes for type filtering. The query result will only return entities of
the specified types and their respective subtype. If no class is specified no type filtering will take place.
FullTextQuery
wrapping around the native Lucene query.public <T> void index(T entity)
index
in interface FullTextManager
entity
- The entity to index - must not be null
.
IllegalArgumentException
- if entity is null or not an @Indexed entitypublic SearchFactory getSearchFactory()
getSearchFactory
in interface FullTextManager
SearchFactory
instance.public <T> void purge(Class<T> entityType, Serializable id)
FullTextManager
entityType
and the identifier id
from the index.
If id == null
all indexed entities of this type and its indexed subclasses are deleted. In this
case this method behaves like FullTextManager.purgeAll(Class)
.
purge
in interface FullTextManager
entityType
- The type of the entity to delete.id
- The id of the entity to delete.public <T> void purgeAll(Class<T> entityType)
FullTextManager
purgeAll
in interface FullTextManager
entityType
- The class of the entities to remove.public void flushToIndexes()
FullTextManager
flushToIndexes
in interface FullTextManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |