Sha256: 64c152c14aefda10dd53c851398eb35bf5b43b3108dd319f2214ad75eec4b818
Contents?: true
Size: 668 Bytes
Versions: 42
Compression:
Stored size: 668 Bytes
Contents
class Person < ActiveRecord::Base define_index do indexes first_name, :sortable => true indexes last_name, :sortable => :insensitive has [first_name, middle_initial, last_name], :as => :name_sort has birthday has gender, :facet => true set_property :min_infix_len => 1 set_property :enable_star => true end sphinx_scope(:with_first_name) { |name| { :conditions => {:first_name => name} } } sphinx_scope(:with_last_name) { |name| { :conditions => {:last_name => name} } } sphinx_scope(:with_id) { |id| { :with => {:sphinx_internal_id => id} } } sphinx_scope(:ids_only) { {:ids_only => true} } end
Version data entries
42 entries across 42 versions & 3 rubygems