Hi,
indeed that changed a bit, mostly because it's not a requirement anymore to use Directory based indexes (to make it possible to use alternative indexing engines);
so assuming you really need to access the Directory the code now would look like as:
Code:
SearchFactoryIntegrator searchFactoryIntegrator = (SearchFactoryIntegrator) fullTextSession.getSearchFactory();
EntityIndexBinder snowIndexBinder = searchFactoryIntegrator.getIndexBindingForEntity( SnowStorm.class );
IndexManager[] indexManagers = snowIndexBinder.getIndexManagers(); // it's an array as sharding might be enabled
DirectoryBasedIndexManager indexManager = (DirectoryBasedIndexManager) indexManagers[0];
Directory directory = indexManager.getDirectoryProvider().getDirectory();
Some new concepts:
EntityIndexBinder is a place where you can access several services bound to a specific indexed type.
IndexManager manages an index and all it's related services - you get an array from getIndexManagers() because of possible sharding options.
DirectoryBasedIndexManager is the only one exposging a getDirectoryProvider() method, as other (future) implementations might not need to be Directory based.
Generally, why do you need to access the Directory?
If it's only to read the Index directly, there is this much easier:
Code:
fullTextSession.getSearchFactory().getIndexReaderAccessor()