class Solr4R::Document

Attributes

result[R]

Public Class Methods

new(result, hash) click to toggle source
# File lib/solr4r/document.rb, line 33
def initialize(result, hash)
  @result, @hash = result, hash

  hash.each { |key, val|
    define_singleton_method(key) { val } unless respond_to?(key, true) }
end

Public Instance Methods

id() click to toggle source
# File lib/solr4r/document.rb, line 50
def id
  fetch('id')
end
more_like_this(*args, &block)
Alias for: more_like_this_q
more_like_this_h(*args, &block) click to toggle source
# File lib/solr4r/document.rb, line 54
def more_like_this_h(*args, &block)
  client.more_like_this_h(id, *args, &block)
end
more_like_this_q(*args, &block) click to toggle source
# File lib/solr4r/document.rb, line 58
def more_like_this_q(*args, &block)
  client.more_like_this_q(id, *args, &block)
end
Also aliased as: more_like_this
to_hash() click to toggle source
# File lib/solr4r/document.rb, line 46
def to_hash
  @hash
end