Sha256: b1756789143705045690a907145a04e22b21d62907e9bc9849fef99aba3c75fe

Contents?: true

Size: 694 Bytes

Versions: 7

Compression:

Stored size: 694 Bytes

Contents

# frozen_string_literal: true

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
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

7 entries across 7 versions & 1 rubygems

Version Path
thinking-sphinx-5.5.1 spec/internal/app/indices/article_index.rb
thinking-sphinx-5.5.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-5.4.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-5.3.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-5.2.1 spec/internal/app/indices/article_index.rb
thinking-sphinx-5.2.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-5.1.0 spec/internal/app/indices/article_index.rb