Module: SphinxSearch::PageExtensions

Defined in:
lib/sphinx_search/page_extensions.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/sphinx_search/page_extensions.rb', line 6

def self.included(base)
  base.define_index do
    set_property :delta => true, :group_concat_max_len => SphinxSearch.content_length || 8.kilobytes
    set_property :field_weights => { 'title' => 100 }
    indexes title, :sortable => true
    indexes parts.content
    has created_at, updated_at, status_id, virtual
  end

  base.extend ClassMethods
end