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.impl
Class SearchFactoryImpl

    java.lang.Object
      org.hibernate.search.impl.SearchFactoryImpl

All Implemented Interfaces:
  SearchFactoryImplementor, SearchFactory

    public class SearchFactoryImpl

extends java.lang.Object
implements SearchFactoryImplementor

Author:
  Emmanuel Bernard

Constructor Summary
`SearchFactoryImpl(SearchConfiguration cfg)`

Method Summary
`void` | `addClassToDirectoryProvider(java.lang.Class<?> clazz, DirectoryProvider<?> directoryProvider, boolean exclusiveIndexUsage)`
`void` | `addDirectoryProvider(DirectoryProvider<?> provider, boolean exclusiveIndexUsage)`
`void` | `addIndexingParameters(DirectoryProvider<?> provider, LuceneIndexingParameters indexingParams)`
`void` | `addOptimizerStrategy(DirectoryProvider<?> provider, OptimizerStrategy optimizerStrategy)`
`QueryContextBuilder` | `buildQueryBuilder()` Return a query builder providing a fluent API to create Lucene queries
`void` | `close()`
`org.apache.lucene.analysis.Analyzer` | `getAnalyzer(java.lang.Class<?> clazz)` Retrieves the scoped analyzer for a given class.
`org.apache.lucene.analysis.Analyzer` | `getAnalyzer(java.lang.String name)` Experimental API retrieve an analyzer instance by its definition name
`BackendQueueProcessorFactory` | `getBackendQueueProcessorFactory()`
`java.util.Set<java.lang.Class<?>>` | `getClassesInDirectoryProvider(DirectoryProvider<?> directoryProvider)`
`java.util.concurrent.locks.ReentrantLock` | `getDirectoryProviderLock(DirectoryProvider<?> dp)`
`java.util.Set<DirectoryProvider<?>>` | `getDirectoryProviders()`
`DirectoryProvider[]` | `getDirectoryProviders(java.lang.Class<?> entity)` Provide access to the DirectoryProviders (hence the Lucene Directories) for a given entity In most cases, the returned type will be a one element array.
`
`<T> DocumentBuilderContainedEntity<T>`
` | `getDocumentBuilderContainedEntity(java.lang.Class<T> entityType)`
`
`<T> DocumentBuilderIndexedEntity<T>`
` | `getDocumentBuilderIndexedEntity(java.lang.Class<T> entityType)`
`java.util.Map<java.lang.Class<?>,DocumentBuilderIndexedEntity<?>>` | `getDocumentBuildersIndexedEntities()`
`ErrorHandler` | `getErrorHandler()`
`int` | `getFilterCacheBitResultsSize()`
`FilterCachingStrategy` | `getFilterCachingStrategy()`
`FilterDef` | `getFilterDefinition(java.lang.String name)`
`java.util.Set<java.lang.Class<?>>` | `getIndexedTypesPolymorphic(java.lang.Class<?>[] classes)`
`LuceneIndexingParameters` | `getIndexingParameters(DirectoryProvider<?> provider)`
`java.lang.String` | `getIndexingStrategy()`
`OptimizerStrategy` | `getOptimizerStrategy(DirectoryProvider<?> provider)`
`ReaderProvider` | `getReaderProvider()` Provide the configured readerProvider strategy, hence access to a Lucene IndexReader
`org.apache.lucene.search.Similarity` | `getSimilarity(DirectoryProvider<?> provider)`
`Worker` | `getWorker()`
`boolean` | `isExclusiveIndexUsageEnabled(DirectoryProvider<?> provider)`
`BatchBackend` | `makeBatchBackend(MassIndexerProgressMonitor progressMonitor)`
`void` | `optimize()` Optimize all indexes
`void` | `optimize(java.lang.Class entityType)` Optimize the index holding `entityType`
`void` | `setBackendQueueProcessorFactory(BackendQueueProcessorFactory backendQueueProcessorFactory)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SearchFactoryImpl

    public SearchFactoryImpl(SearchConfiguration cfg)

Method Detail

### getBackendQueueProcessorFactory

    public BackendQueueProcessorFactory getBackendQueueProcessorFactory()

  Specified by:
    `getBackendQueueProcessorFactory` in interface `SearchFactoryImplementor`

### setBackendQueueProcessorFactory

    public void setBackendQueueProcessorFactory(BackendQueueProcessorFactory backendQueueProcessorFactory)

  Specified by:
    `setBackendQueueProcessorFactory` in interface `SearchFactoryImplementor`

### getIndexingStrategy

    public java.lang.String getIndexingStrategy()

  Specified by:
    `getIndexingStrategy` in interface `SearchFactoryImplementor`

### close

    public void close()

  Specified by:
    `close` in interface `SearchFactoryImplementor`

### addClassToDirectoryProvider

    public void addClassToDirectoryProvider(java.lang.Class<?> clazz,
                                            DirectoryProvider<?> directoryProvider,
                                            boolean exclusiveIndexUsage)

  Specified by:
    `addClassToDirectoryProvider` in interface `SearchFactoryImplementor`

### getClassesInDirectoryProvider

    public java.util.Set<java.lang.Class<?>> getClassesInDirectoryProvider(DirectoryProvider<?> directoryProvider)

  Specified by:
    `getClassesInDirectoryProvider` in interface `SearchFactoryImplementor`

### getDocumentBuildersIndexedEntities

    public java.util.Map<java.lang.Class<?>,DocumentBuilderIndexedEntity<?>> getDocumentBuildersIndexedEntities()

  Specified by:
    `getDocumentBuildersIndexedEntities` in interface `SearchFactoryImplementor`

### getDocumentBuilderIndexedEntity

    public <T> DocumentBuilderIndexedEntity<T> getDocumentBuilderIndexedEntity(java.lang.Class<T> entityType)

  Specified by:
    `getDocumentBuilderIndexedEntity` in interface `SearchFactoryImplementor`

### getDocumentBuilderContainedEntity

    public <T> DocumentBuilderContainedEntity<T> getDocumentBuilderContainedEntity(java.lang.Class<T> entityType)

  Specified by:
    `getDocumentBuilderContainedEntity` in interface `SearchFactoryImplementor`

### getDirectoryProviders

    public java.util.Set<DirectoryProvider<?>> getDirectoryProviders()

  Specified by:
    `getDirectoryProviders` in interface `SearchFactoryImplementor`

### getWorker

    public Worker getWorker()

  Specified by:
    `getWorker` in interface `SearchFactoryImplementor`

### addOptimizerStrategy

    public void addOptimizerStrategy(DirectoryProvider<?> provider,
                                     OptimizerStrategy optimizerStrategy)

  Specified by:
    `addOptimizerStrategy` in interface `SearchFactoryImplementor`

### addIndexingParameters

    public void addIndexingParameters(DirectoryProvider<?> provider,
                                      LuceneIndexingParameters indexingParams)

  Specified by:
    `addIndexingParameters` in interface `SearchFactoryImplementor`

### getOptimizerStrategy

    public OptimizerStrategy getOptimizerStrategy(DirectoryProvider<?> provider)

  Specified by:
    `getOptimizerStrategy` in interface `SearchFactoryImplementor`

### getIndexingParameters

    public LuceneIndexingParameters getIndexingParameters(DirectoryProvider<?> provider)

  Specified by:
    `getIndexingParameters` in interface `SearchFactoryImplementor`

### getReaderProvider

    public ReaderProvider getReaderProvider()

  Description copied from interface: `SearchFactory`
  Provide the configured readerProvider strategy, hence access to a Lucene IndexReader

  Specified by:
    `getReaderProvider` in interface `SearchFactory`

### getDirectoryProviders

    public DirectoryProvider[] getDirectoryProviders(java.lang.Class<?> entity)

  Description copied from interface: `SearchFactory`
  Provide access to the DirectoryProviders (hence the Lucene Directories) for a given entity In most cases, the returned type will be a one element array. But if the given entity is configured to use sharded indexes, then multiple elements will be returned. In this case all of them should be considered.

  Specified by:
    `getDirectoryProviders` in interface `SearchFactory`

### optimize

    public void optimize()

  Description copied from interface: `SearchFactory`
  Optimize all indexes

  Specified by:
    `optimize` in interface `SearchFactory`

### optimize

    public void optimize(java.lang.Class entityType)

  Description copied from interface: `SearchFactory`
  Optimize the index holding `entityType`

  Specified by:
    `optimize` in interface `SearchFactory`

### getAnalyzer

    public org.apache.lucene.analysis.Analyzer getAnalyzer(java.lang.String name)

  Description copied from interface: `SearchFactory`
  Experimental API retrieve an analyzer instance by its definition name

  Specified by:
    `getAnalyzer` in interface `SearchFactory`

### getAnalyzer

    public org.apache.lucene.analysis.Analyzer getAnalyzer(java.lang.Class<?> clazz)

  Description copied from interface: `SearchFactory`
  Retrieves the scoped analyzer for a given class.

  Specified by:
    `getAnalyzer` in interface `SearchFactory`
  Parameters:
    `clazz` - The class for which to retrieve the analyzer.
  Returns:
    The scoped analyzer for the specified class.

### buildQueryBuilder

    public QueryContextBuilder buildQueryBuilder()

  Description copied from interface: `SearchFactory`
  Return a query builder providing a fluent API to create Lucene queries

  Specified by:
    `buildQueryBuilder` in interface `SearchFactory`

### getFilterCachingStrategy

    public FilterCachingStrategy getFilterCachingStrategy()

  Specified by:
    `getFilterCachingStrategy` in interface `SearchFactoryImplementor`

### getFilterDefinition

    public FilterDef getFilterDefinition(java.lang.String name)

  Specified by:
    `getFilterDefinition` in interface `SearchFactoryImplementor`

### getDirectoryProviderLock

    public java.util.concurrent.locks.ReentrantLock getDirectoryProviderLock(DirectoryProvider<?> dp)

  Specified by:
    `getDirectoryProviderLock` in interface `SearchFactoryImplementor`

### addDirectoryProvider

    public void addDirectoryProvider(DirectoryProvider<?> provider,
                                     boolean exclusiveIndexUsage)

  Specified by:
    `addDirectoryProvider` in interface `SearchFactoryImplementor`

### getFilterCacheBitResultsSize

    public int getFilterCacheBitResultsSize()

  Specified by:
    `getFilterCacheBitResultsSize` in interface `SearchFactoryImplementor`

### getIndexedTypesPolymorphic

    public java.util.Set<java.lang.Class<?>> getIndexedTypesPolymorphic(java.lang.Class<?>[] classes)

  Specified by:
    `getIndexedTypesPolymorphic` in interface `SearchFactoryImplementor`

### makeBatchBackend

    public BatchBackend makeBatchBackend(MassIndexerProgressMonitor progressMonitor)

  Specified by:
    `makeBatchBackend` in interface `SearchFactoryImplementor`

### getSimilarity

    public org.apache.lucene.search.Similarity getSimilarity(DirectoryProvider<?> provider)

  Specified by:
    `getSimilarity` in interface `SearchFactoryImplementor`

### isExclusiveIndexUsageEnabled

    public boolean isExclusiveIndexUsageEnabled(DirectoryProvider<?> provider)

  Specified by:
    `isExclusiveIndexUsageEnabled` in interface `SearchFactoryImplementor`

### getErrorHandler

    public ErrorHandler getErrorHandler()

  Specified by:
    `getErrorHandler` in interface `SearchFactoryImplementor`

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.