Created
July 19, 2013 05:51
-
-
Save psykidellic/6036941 to your computer and use it in GitHub Desktop.
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
| s = Tire.search(SEARCH_INDEX_NAME, :type => 'album', :size => 10) do | |
| query do | |
| boolean do | |
| genres.each do |g| | |
| should { string "genres:#{g}" } | |
| end | |
| end | |
| end | |
| unless already_seen_albums.empty? | |
| filter :not , {:ids => { :values => already_seen_albums }} | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment