Sha256: f7eb7ecf057fd9666ef5acb5845bc3183f8465622fd6f20d7a0f837af0d84f08

Contents?: true

Size: 732 Bytes

Versions: 9

Compression:

Stored size: 732 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
  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

9 entries across 9 versions & 1 rubygems

Version Path
thinking-sphinx-5.0.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-4.4.1 spec/internal/app/indices/article_index.rb
thinking-sphinx-4.4.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-4.3.2 spec/internal/app/indices/article_index.rb
thinking-sphinx-4.3.1 spec/internal/app/indices/article_index.rb
thinking-sphinx-4.3.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-4.2.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-4.1.0 spec/internal/app/indices/article_index.rb
thinking-sphinx-4.0.0 spec/internal/app/indices/article_index.rb