Module: ActsAsXapian::ProxyFinder
- Defined in:
- lib/acts_as_xapian/base.rb
Instance Method Summary collapse
- #find_with_xapian(search_term, options = {}) ⇒ Object
- #search_with_xapian(search_term, options = {}) ⇒ Object
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, = {}) search_with_xapian(search_term, ).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, = {}) ActsAsXapian::Search.new([proxy_reflection.klass], "#{proxy_reflection.primary_key_name}:#{proxy_owner.id} #{search_term}", ) end |