开发者

How to use multiple index directory in hibernate-search?

开发者 https://www.devze.com 2023-03-25 19:54 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消