Skip to content

Instantly share code, notes, and snippets.

@msonnabaum
Created January 22, 2014 20:29
Show Gist options
  • Save msonnabaum/b3950b42e5d9d8b37c2a to your computer and use it in GitHub Desktop.
Save msonnabaum/b3950b42e5d9d8b37c2a to your computer and use it in GitHub Desktop.
{
query: {
filtered: {
query: {match_all: {}},
filter: {
and: ->{
filters = [{or: prefix_arguments}]
if range_filters.any?
filters << {and: range_filters}
end
filters
}.call
}
}
},
size: options[:size] || 99,
sort: sort_by
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment