I just installed latest advanced search plug-in. When I click the search button in my "advanced search" page nothing happens. I figured out the reason being facet queries that I have in my advanced search webpage. Below is my facet query that is causing issue. I use this facet query in my index page and advanced search plug-in has picked up all facets in my index page.
config.add_facet_field 'Performed_Dt_Tm', collapse: false, :label => 'By
Date Range', query: {
A: {
fq: "Performed_Dt_Tm:[* TO *]"
}
}
I have multiple facet query like above. I tried below steps but nothing solved my issue,
Tried to exclude all facets from appearing in advanced search webpage by making below modification. But all facets disappearing except solr facet query like the one above,
config.advanced_search[:form_solr_parameters] ||= { "facet.field" => ["author"], "facet.limit" => -1, # return all facet values "facet.sort" => "index" # sort by byte order of values }
Tried to exclude specific facet query from displaying in advanced search page but not sure how to do this in controller.
Any help will be much appreciated. Thank you.
Found answer in this link.
https://github.com/projectblacklight/blacklight/issues/717
example: apps/controllers/catalog_controller.rb
config.add_Facet_field 'field', show: :render, query: {...}
def render
if params[:controller] == 'catalog'
true
else
false
end
end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.