Module: ActsAsXapian::ProxyFinder

Defined in:
lib/acts_as_xapian/base.rb

Instance Method Summary collapse

Instance Method Details

#find_with_xapian(search_term, options = {}) ⇒ Object



204
205
206
# File 'lib/acts_as_xapian/base.rb', line 204

def find_with_xapian(search_term, options = {})
  search_with_xapian(search_term, options).results.map {|x| x[:model] }
end

#search_with_xapian(search_term, options = {}) ⇒ Object



208
209
210
# File 'lib/acts_as_xapian/base.rb', line 208

def search_with_xapian(search_term, options = {})
  ActsAsXapian::Search.new([proxy_reflection.klass], "#{proxy_reflection.primary_key_name}:#{proxy_owner.id} #{search_term}", options)
end