Skip to content

Instantly share code, notes, and snippets.

@psykidellic
Created July 19, 2013 05:51
Show Gist options
  • Select an option

  • Save psykidellic/6036941 to your computer and use it in GitHub Desktop.

Select an option

Save psykidellic/6036941 to your computer and use it in GitHub Desktop.
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