SOLR Permissions / Filtering Results depending on Access Rights

前端 未结 6 2012
北恋
北恋 2021-02-07 06:48

For example I have Documents A, B, C. User 1 must only be able to see Documents A, B. User 2 must only be able to see Document C. Is it possible to do it in SOLR without filteri

6条回答
  •  佛祖请我去吃肉
    2021-02-07 07:47

    There are no built in mechanisms for Solr that I am aware of that will allow you to control access to documents without maintaining the rights in the metadata. The approach outlined by aitchnyu seems reasonable if you keep it a true role level and not assign user specific permissions to a document. That way you can assign roles to users and this will grant them the ability to see documents in the index. Granted you will still need to reindex documents when the roles change, but hopefully you can identify most of the needed roles ahead if time and reduce the need for frequent reindexing.

提交回复
热议问题