okfn/elasticsearch.js — pull request #4 by kielni (2013-08-08 18:19:41+00:00)
Title: create a filtered query if there are filters set

Change _normalizeQuery to create a filtered query if the queryObj has filters. For example:

"query": {
"filtered": {
"filter": {
"and": [
{
"term": {
"tag": "Seasonal"
}
}
]
},
"query": {
"query_string": {
"query": "food"
}
}
}
}