Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.search.sandbox.standalone
Interface FullTextManager

All Known Implementing Classes:
  LuceneFullTextManager

    public interface FullTextManager

Author:
  Emmanuel Bernard

Method Summary
`FullTextQuery` | `createFullTextQuery(org.apache.lucene.search.Query luceneQuery, java.lang.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.
`
`<T> T`
` | `get(java.lang.Class<T> entityType, java.io.Serializable id)` Returns the entity instance of a given type and id value
`SearchFactory` | `getSearchFactory()`
`
`<T> void`
` | `index(T entity)` Force the (re)indexing of a given managed object.
`
`<T> void`
` | `purge(java.lang.Class<T> entityType, java.io.Serializable id)` Remove the entity with the type `entityType` and the identifier `id` from the index.
`
`<T> void`
` | `purgeAll(java.lang.Class<T> entityType)` Remove all entities from of particular class and all its subclasses from the index.

Method Detail

### get

    <T> T get(java.lang.Class<T> entityType,
              java.io.Serializable id)

  Returns the entity instance of a given type and id value

### createFullTextQuery

    FullTextQuery createFullTextQuery(org.apache.lucene.search.Query luceneQuery,
                                      java.lang.Class<?>... entities)

  Create a fulltext query on top of a native Lucene query returning the matching objects of type `entities` and their respective subclasses.

  Parameters:
    `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.
  Returns:
    A `FullTextQuery` wrapping around the native Lucene query.
  Throws:
    `java.lang.IllegalArgumentException` - if entityType is `null` or not a class or superclass annotated with `@Indexed`.

### index

    <T> void index(T entity)

  Force the (re)indexing of a given managed object. Indexation is batched per transaction: if a transaction is active, the operation will not affect the index at least until commit.

  Parameters:
    `entity` - The entity to index - must not be `null`.
  Throws:
    `java.lang.IllegalArgumentException` - if entity is null or not an @Indexed entity

### getSearchFactory

    SearchFactory getSearchFactory()

  Returns:
    the `SearchFactory` instance.

### purge

    <T> void purge(java.lang.Class<T> entityType,
                   java.io.Serializable id)

  Remove the entity with the type `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 `purgeAll(Class)`.

  Parameters:
    `entityType` - The type of the entity to delete.
    `id` - The id of the entity to delete.
  Throws:
    `java.lang.IllegalArgumentException` - if entityType is `null` or not a class or superclass annotated with `@Indexed`.

### purgeAll

    <T> void purgeAll(java.lang.Class<T> entityType)

  Remove all entities from of particular class and all its subclasses from the index.

  Parameters:
    `entityType` - The class of the entities to remove.
  Throws:
    `java.lang.IllegalArgumentException` - if entityType is `null` or not a class or superclass annotated with `@Indexed`.

### flushToIndexes

    void flushToIndexes()

  Flush all index changes forcing Hibernate Search to apply all changes to the index not waiting for the batch limit.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 Hibernate. All Rights Reserved.