DhavalKapil / elasticsearch-lua

Lua client for Elasticsearch
http://elasticsearch-lua.readthedocs.io/
MIT License
150 stars 38 forks source link

Request method now can be overload in config #11

Closed CriztianiX closed 8 years ago

CriztianiX commented 8 years ago

it looks like the elastic search library uses lua socket directly, so it will block the nginx worker (using it in nginx) when it runs queries. This patch provides support for openresty, using openresty's co-socket api to do non-blocking requests to the elastic search server An example can be found here: https://github.com/CriztianiX/lapis-elasticsearch/blob/master/lapis/db/elasticsearch.lua#L16

DhavalKapil commented 8 years ago

Can you add an example to use this preferred_engine in examples? preferred_engine sounds too long, I guess just engine would do.

Also you will need to modify the tests so that they pass.