Skip to content
phebal edited this page Feb 4, 2016 · 1 revision

Select collections:

query = 'has_model_ssim:Collection'

# User
args = {rows: 999999, fq: "-depositor_ssim:institutional-*"}
# Root institutional
args = {rows: 999999, fq: "depositor_ssim:institutional-* AND -isPartOf_ssim:[* TO *]"}
# institutional root children
args = {rows: 999999, fq: "{!join from=hasCollectionMember_ssim to=id}-isPartOf_ssim:[* TO *] AND depositor_ssim:institutional-*"}

ActiveFedora::SolrService.query(query, args).count