app/controllers/spotlight/catalog_controller.rb
# "id_ng" and "full_title_ng" should be defined in the Solr core's schema.xml.
# It's expected that these fields will be set up to have  EdgeNGram filter
# setup within their index analyzer. This will ensure that this method returns
# results when a partial match is passed in the "q" parameter.
"id_ng" and "full_title_ng" should be defined in the Solr core's schema.xml.
It's expected that these fields will be set up to have  EdgeNGram filter
setup within their index analyzer. This will ensure that this method returns
results when a partial match is passed in the "q" parameter.
" id_ng " and " full_title_ng " should be defined in the Solr core ' s schema . xml . It ' s expected that these fields will be set up to have EdgeNGram filter setup within their index analyzer . This will ensure that this method returns results when a partial match is passed in the " q " parameter .
def autocomplete
      search_params = params.merge(search_field: Spotlight::Engine.config.autocomplete_search_field)
      (_, @document_list) = search_results(search_params.merge(public: true, rows: 100))
      respond_to do |format|
        format.json do
          render json: { docs: autocomplete_json_response(@document_list) }
        end
      end
    end
def autocomplete search_params = params . merge ( search_field : Spotlight :: Engine . config . autocomplete_search_field ) ( _ , @document_list ) = search_results ( search_params . merge ( public : true , rows : 100 ) ) respond_to do | format | format . json do render json : { docs : autocomplete_json_response ( @document_list ) } end end end
"id_ng" and "full_title_ng" should be defined in the Solr core's schema.xml.
" id_ng " and " full_title_ng " should be defined in the Solr core ' s schema . xml .