samvera-deprecated / curation_concerns

A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.
Other
15 stars 27 forks source link

Replace subtraction logic in ResourceStatisticsSource #1003

Closed mjgiarlo closed 7 years ago

mjgiarlo commented 7 years ago

The ResourceStatisticsSource (app/sources/curation_concerns/resource_statistics_source.rb) currently gets a count restricted objects by querying for total objects and non-restricted objects and then calculating the difference. If we can get Solr to do our bidding, it would be preferable for Solr to do this calculation for us. We need a count of all Solr documents that either 1) lack the read_access_group_ssim key or 2) have the key without the values of public or registered (if the object is shared with other groups).