Sha256: ef5694559c464faac2ec5ee27a5e67c6cf863ca238d6fe343f6f400c3edbb35e

Contents?: true

Size: 450 Bytes

Versions: 15

Compression:

Stored size: 450 Bytes

Contents

class FilteredArtwork
  include Mongoid::Document
  include Mongoid::FullTextSearch
  field :title
  fulltext_search_in :title, :index_name => 'mongoid_fulltext.artworks_and_artists',
                     :filters => { :is_foobar => lambda { |x| x.title == 'foobar' },
                                   :is_artwork => lambda { |x| true },
                                   :is_artist => lambda { |x| false }
                                  }
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mongoid_fulltext-0.5.7 spec/models/filtered_artwork.rb
mongoid_fulltext-0.5.6 spec/models/filtered_artwork.rb
mongoid_fulltext-0.5.5 spec/models/filtered_artwork.rb
mongoid_fulltext-0.5.4 spec/models/filtered_artwork.rb
mongoid_fulltext-0.5.3 spec/models/filtered_artwork.rb
mongoid_fulltext-0.5.2 spec/models/filtered_artwork.rb
mongoid_fulltext-0.5.1 spec/models/filtered_artwork.rb
mongoid_fulltext-0.5.0 spec/models/filtered_artwork.rb
mongoid_fulltext-0.4.5 spec/models/filtered_artwork.rb
mongoid_fulltext-0.4.4 spec/models/filtered_artwork.rb
mongoid_fulltext-0.4.3 spec/models/filtered_artwork.rb
mongoid_fulltext-0.4.2 spec/models/filtered_artwork.rb
mongoid_fulltext-0.4.1 spec/models/filtered_artwork.rb
mongoid_fulltext-0.4.0 spec/models/filtered_artwork.rb
mongoid_fulltext-0.3.6 spec/models/filtered_artwork.rb