module FullTextSearch
  module Hooks
    module ControllerSearchIndex
      def index
        @full_text_search_order_target = params[:order_target].presence || "score"
        @full_text_search_order_type = params[:order_type].presence || "desc"
        super
      end
    end
  end
end

module FullTextSearch
  module Hooks
    module ControllerSearchIndex
      def index
        @full_text_search_order_target = params[:order_target].presence || "score"
        @full_text_search_order_type = params[:order_type].presence || "desc"
        params[:order_target] = @full_text_search_order_target
        params[:order_type] = @full_text_search_order_type
        super
      end
    end
  end
end

Set search result order properly when using top right search box
Set search result order properly when using top right search box

Fix #5
