Created
November 7, 2011 19:50
-
-
Save bds/1345955 to your computer and use it in GitHub Desktop.
Example Debug for Sunpsot Solr hit objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search = Sunspot.search(JobPosting) do | |
keywords 'sales' | |
end | |
search.hits.each do |h| | |
ap [ h.score, | |
h.result.attributes.select {|k,v| ["title", "description"].include? k }] | |
end;nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment