Solr does not have document-level security, so you would have to retrieve and index access control lists for each document. Then you need to apply a filter query to every search and pass in the user’s security group and/or username.
Let’s say your document is indexed like this, where the values for the multivalued field “access” is determined at index time by the actual permissions on the file:
<field name=”title”>Product list</field>
Then you can decorate the query request handler with a default filter query parameter in solrconfig.xml:
<requestHandler name=”/select” class=”solr.SearchHandler”>
Now searches by default will not return the Products.xlsx document, since the default ‘user’ that is impersonated (namely “OFFICE\Everyone”) does not appear in the “access” field. But as soon as you pass in an actual user’s group to override the default filter query, Solr will return the document:
Of course when the permissions change, the index must be updated as soon as possible to reflect this.
ProsperaSoft offers Solr development solutions. You can email at firstname.lastname@example.org to get in touch with ProsperaSoft Solr experts and consultants.