Skip to content

Instantly share code, notes, and snippets.

@matpalm
Created September 12, 2010 11:17
Show Gist options
  • Save matpalm/575996 to your computer and use it in GitHub Desktop.
Save matpalm/575996 to your computer and use it in GitHub Desktop.
index.search("europe").hits.each { |hit| puts hit.inspect }
#<struct Ferret::Search::Hit doc=6, score=0.446250796318054>
#<struct Ferret::Search::Hit doc=7, score=0.446250796318054>
#<struct Ferret::Search::Hit doc=8, score=0.446250796318054>
puts index[7].load.inspect
{:continent=>"europe", :name=>"London"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment