Project
es_tractor
Minimal, simple, DRY DSL for searching Elasticsearch.
Takes one shallow hash argument and translates it to an elaborate one passed
on to elasticsearch-api. The price: narrower options. The gain: succinctness.
For example, a root <tt>:range</tt> is always a boolean filter and always
includes the edges:
tractor = Client.new
opts = { range: { timestamp: ['now-5m', 'now'] } }
tractor.search(opts) # => sends the following to Ealsticsearch:
{
"query": {
"bool": {
"filter": [
{
"range": {
"timestamp": {
"gte":"now-5m",
"lte":"now"
}
}
}
],
"must": [],
}
}
}
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
Development
Licenses
MIT