public class FSDirectoryProvider extends Object implements DirectoryProvider<org.apache.lucene.store.FSDirectory>
FSDirectory. The base directory is represented by the property hibernate.search.default.indexBase
or hibernate.search.<index>.indexBase. The former defines the default base directory for all indexes whereas the
latter allows to override the base directory on a per index basis. <index> has to be replaced with the fully qualified
classname of the indexed class or the value of the index property of the @Indexed annotation.
The actual index files are then created in <indexBase>/<index name>, <index name> is
per default the name of the indexed entity, or the value of the index property of the @Indexed or can be specified
as property in the configuration file using hibernate.search.<index>.indexName.
| Constructor and Description |
|---|
FSDirectoryProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.apache.lucene.store.FSDirectory |
getDirectory()
Give access to the initialized Lucene Directory.
|
int |
hashCode() |
void |
initialize(String directoryProviderName,
Properties properties,
BuildContext context)
get the information to initialize the directory and build its hashCode/equals method
|
void |
start(DirectoryBasedIndexManager indexManager)
Executed after initialize, this method set up the heavy process of starting up the DirectoryProvider
IO processing as well as background processing are expected to be set up here
|
void |
stop()
Executed when the search factory is closed.
|
public void initialize(String directoryProviderName, Properties properties, BuildContext context)
DirectoryProviderinitialize in interface DirectoryProvider<org.apache.lucene.store.FSDirectory>directoryProviderName - the name of the index (directory) to createproperties - the configuration propertiescontext - provide access to some services at initializationpublic void start(DirectoryBasedIndexManager indexManager)
DirectoryProviderstart in interface DirectoryProvider<org.apache.lucene.store.FSDirectory>indexManager - the index managerpublic void stop()
DirectoryProviderstop in interface DirectoryProvider<org.apache.lucene.store.FSDirectory>public org.apache.lucene.store.FSDirectory getDirectory()
DirectoryProvidergetDirectory in interface DirectoryProvider<org.apache.lucene.store.FSDirectory>Copyright © 2006–2017 Hibernate. All rights reserved.