Sha256: fb810ed145a768a2f1581c5adea9474d46cdb8b16281da7faea4f15a8a4c6dad
Contents?: true
Size: 510 Bytes
Versions: 3
Compression:
Stored size: 510 Bytes
Contents
module Geoblacklight module ControllerOverride extend ActiveSupport::Concern included do solr_search_params_logic << :add_spatial_params end def add_spatial_params(solr_params, req_params) if req_params[:bbox] solr_params[:bq] ||= [] solr_params[:bq] = ["solr_bbox:\"IsWithin(#{req_params[:bbox]})\"^10"] solr_params[:fq] ||= [] solr_params[:fq] << "solr_bbox:\"Intersects(#{req_params[:bbox]})\"" end solr_params end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
geoblacklight-0.6.2 | lib/geoblacklight/controller_override.rb |
geoblacklight-0.6.1 | lib/geoblacklight/controller_override.rb |
geoblacklight-0.6.0 | lib/geoblacklight/controller_override.rb |