Sha256: 48d36c29b88f6bd07fe21549e301be70577fe831070d997bc4aef77f4a78caef

Contents?: true

Size: 701 Bytes

Versions: 4

Compression:

Stored size: 701 Bytes

Contents

ThinkingSphinx::Index.define :article, :with => :active_record do
  indexes title, content
  indexes user.name, :as => :user
  indexes user.articles.title, :as => :related_titles

  has published, user_id
  has taggings.tag_id, :as => :tag_ids, :source => :query
  has taggings.created_at, :as => :taggings_at, :type => :timestamp

  set_property :min_infix_len => 4
  set_property :enable_star   => true
end

ThinkingSphinx::Index.define :article, :with => :active_record,
  :name => 'stemmed_article' do

  indexes title

  has published, user_id
  has taggings.tag_id, :as => :tag_ids
  has taggings.created_at, :as => :taggings_at, :type => :timestamp

  set_property :morphology => 'stem_en'
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thinking-sphinx-3.4.2 spec/internal/app/indices/article_index.rb
thinking-sphinx-3.4.1 spec/internal/app/indices/article_index.rb
thinking-sphinx-3.4.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-3.3.0 spec/internal/app/indices/article_index.rb