Module: Geoblacklight::ControllerOverride

Extended by:
ActiveSupport::Concern
Defined in:
lib/geoblacklight/controller_override.rb

Instance Method Summary collapse

Instance Method Details

#add_spatial_params(solr_params, req_params) ⇒ Object


8
9
10
11
12
13
14
15
16
# File 'lib/geoblacklight/controller_override.rb', line 8

def add_spatial_params(solr_params, req_params)
  if req_params[:bbox]
    solr_params[:bq] ||= []
    solr_params[:bq] = ["#{Settings.GEOMETRY_FIELD}:\"IsWithin(#{req_params[:bbox]})\"^10"]
    solr_params[:fq] ||= []
    solr_params[:fq] << "#{Settings.GEOMETRY_FIELD}:\"Intersects(#{req_params[:bbox]})\""
  end
  solr_params
end

#metadataObject


22
23
24
# File 'lib/geoblacklight/controller_override.rb', line 22

def 
  @response, @document = get_solr_response_for_doc_id params[:id]
end

#web_servicesObject


18
19
20
# File 'lib/geoblacklight/controller_override.rb', line 18

def web_services
  @response, @document = get_solr_response_for_doc_id params[:id]
end