Sha256: e0306914524e99c6921953b9cae23252b872e330ef25c6224f12b136d95ea709

Contents?: true

Size: 605 Bytes

Versions: 2

Compression:

Stored size: 605 Bytes

Contents

module ActiveFedora
  module Querying
    delegate :find, :first, :exists?, :where, :limit, :order, :delete_all, 
      :destroy_all, :count, :last, :find_with_conditions, :find_in_batches, :find_each, :to=>:all

    def self.extended(base)
      base.class_attribute  :solr_query_handler
      base.solr_query_handler = 'standard'
    end

    def default_sort_params
      [ActiveFedora::SolrService.solr_name(:system_create, :stored_sortable, type: :date)+' asc'] 
    end

    def quote_for_solr(value)
      '"' + value.gsub(/(:)/, '\\:').gsub(/(\/)/, '\\/').gsub(/"/, '\\"') + '"'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active-fedora-7.0.0.pre2 lib/active_fedora/querying.rb
active-fedora-7.0.0.pre1 lib/active_fedora/querying.rb