Sha256: a98af5a21a7689039813c9e0189c2d20f5f3bcefcaaaf04355c95f63c79e394a
Contents?: true
Size: 559 Bytes
Versions: 65
Compression:
Stored size: 559 Bytes
Contents
module ActiveFedora module Calculations # Get a count of the number of objects from solr # Takes :conditions as an argument def count(*args) return apply_finder_options(args.first).count if args.any? opts = {} opts[:rows] = limit_value if limit_value opts[:sort] = order_values if order_values calculate :count, where_values, opts end def calculate(calculation, conditions, opts={}) SolrService.query(create_query(conditions), :raw=>true, :rows=>0)['response']['numFound'] end end end
Version data entries
65 entries across 65 versions & 1 rubygems