Sha256: 3ac5a25f3173545a9b30da747379d13f23bea268390a443ecaaed4cb518a1592

Contents?: true

Size: 495 Bytes

Versions: 5

Compression:

Stored size: 495 Bytes

Contents

class Alpha < ActiveRecord::Base
  define_index do
    indexes :name, :sortable => true
    
    has value, created_at, created_on
    has cost, :facet => true
    
    set_property :field_weights => {"name" => 10}
  end
  
  define_index 'alternative' do
    indexes :name, :as => :alternative_name, :sortable => true
    
    has value, created_at, created_on
    has cost, :facet => true
    
    set_property :field_weights => {'alternative_name' => 10}
    
    where "value > 3"
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
thinking-sphinx-1.3.9 features/support/models/alpha.rb
ts-xml-0.0.1 features/support/models/alpha.rb
thinking-sphinx-1.3.8 features/support/models/alpha.rb
thinking-sphinx-1.3.7 features/support/models/alpha.rb
thinking-sphinx-1.3.6 features/support/models/alpha.rb