How to use multiple index directory in hibernate-search?
I use hibernate-search. I want that each user can see only theirself index and use it for searching and can't use index of ot开发者_如何学运维her users. How can I do this? Thanks
There is one index per indexed class (class hierarchy) and there is no Lucene index sharding. The Lucene way of solving your problem is using a filter which will filter away all results which don't belong to a certain user. Check the SecurityFilter example of the Hibernate Search online docs.
精彩评论