A Moonscript/lua elasticsearch library based on concept of http://elastica.io
Take a look at eluastica/query directory for a complete list of implemented queries
import EluasticaQueryMatchAll from require "eluastica.query.match_all"
match_all = EluasticaQueryMatchAll!
Take a look at eluastica/filter directory for a complete list of implemented queries
import EluasticaFilterTerms from require "eluastica.filter.terms"
names = EluasticaFilterTerms 'Document.name', {'Juan', 'Luis', 'Pedro'}
names\setParam "execution", "or"
import EluasticaConnection from require "eluastica.connection"
connection = EluasticaConnection!
connection\setHost "HOST"
connection\setPort "PORT"
import EluasticaRequest from require "eluastica.request"
request = EluasticaRequest!
request\setConnection connection
request\setMethod EluasticaRequest.GET
import EluasticaQueryFiltered from require "eluastica.query.filtered"
import EluasticaQuery from require "eluastica.query"
query_filtered = EluasticaQueryFiltered!
query_filtered\setQuery match_all
query_filtered\setFilter names
elastic_query = EluasticaQuery!
elastic_query\setQuery query_filtered
elastic_query\setSize 10
elastic_query\setPage 1
request\setPath "/your-index/your-type/_search"
request\setQuery elastic_query\toArray!
results = request\send!