Hi Amin,
yes provided you use the IndexReader in read only mode it would be safe, but you actually get the same object you would from the FullTextSession, but this one as some benefits:
- in case you enable sharding, you would still receive the correct one or a multireader wrapping the correct ones
- Search manages the IndexReader to provide very efficient reopening strategies, it won't be as fast just opening one yourself
- opening a Hibernate Session doesn't open a database connection until you need it, so it's a cheap operation
- first search of Lucene index on a new reader will be slower as the internal fieldcaches must be filled. using the Search provided reader this might be pooled and so it might have the caches filled in already
- you don't need to configure externally where these directories are
- you would have an hard time getting the reference to any non-fs directory, so it would be hard to try for example the new Infinispan based index
you have other reasons to open one yourself?
also you actually only need a reference to the SearchFactory, you could retrieve this once and keep the reference without opening a Session everytime you need (although that's not slow at all).