<commit_before>class Me::PagesController < Me::BaseController

  include_controllers 'common/page_search'

  def show
  end

  #
  # see controller/common/page_search.rb
  #
  def index
    @path = apply_path_modifiers( parsed_path() )
    if request.xhr?
      # note: pagination_params is used just for defaults,
      #       normal pagination is done through @path.
      @pages = Page.paginate_by_path(@path, options_for_me, pagination_params)
    end
    render :template => 'common/pages/search/index', :locals => {:columns => :updated_with_owner}
  end

  protected

  def setup_navigation(nav)
    nav[:local] = [
      {:active => false, :visible => true, :html => {:partial => 'common/pages/search/create'}},
      {:active => true,  :visible => true, :html => {:partial => 'common/pages/search/controls_active'}},
      {:active => false, :visible => true, :html => {:partial => 'common/pages/search/controls_possible'}}
    ]
    return nav
  end

  #
  # the common page search code relies on this being defined
  #
  def page_search_path(*args)
    me_pages_path(*args)
  end

end

<commit_msg>use Sphinx to search through me/pages<commit_after>class Me::PagesController < Me::BaseController

  include_controllers 'common/page_search'

  def show
  end

  #
  # see controller/common/page_search.rb
  #
  def index
    @path = apply_path_modifiers( parsed_path() )
    if request.xhr?
      # note: pagination_params is used just for defaults,
      #       normal pagination is done through @path.
      @pages = Page.paginate_by_path(@path, options_for_me(:method => :sphinx), pagination_params)
    end
    render :template => 'common/pages/search/index', :locals => {:columns => :updated_with_owner}
  end

  protected

  def setup_navigation(nav)
    nav[:local] = [
      {:active => false, :visible => true, :html => {:partial => 'common/pages/search/create'}},
      {:active => true,  :visible => true, :html => {:partial => 'common/pages/search/controls_active'}},
      {:active => false, :visible => true, :html => {:partial => 'common/pages/search/controls_possible'}}
    ]
    return nav
  end

  #
  # the common page search code relies on this being defined
  #
  def page_search_path(*args)
    me_pages_path(*args)
  end

end


{'fraction_non_alphanumeric': 0.1312997347480106, 'fraction_numerical': 0.0, 'mean_word_length': 3.4635108481262327, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '656592', 'n_tokens_mistral': 731, 'n_tokens_neox': 707, 'n_words': 176}