We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Celastica - Elasticsearch client in Zephir

Hi

Celastica is Elasticsearch client writen in Zephir which could be compiled to php extension. It is ported PHP library initialy stared by Rufflin. Few days ago i have published code ( port from PHP Elastica writen in zephir called celastica ). Comments, suggestions and contributions welcome.

You could find it here: https://github.com/ariskemper/celastica

Best regards Aris

wow! will try it out on current project im working on for sure! thanks!

This is way cool!

i was eager to try it out today, since it sounds too good not to be used :)

couldn't get it to compile to .so; here's what happened:

everything went well up to these two lines :

../zephir/bin/zephir generate

../zephir/bin/zephir compile

when i tried to execute generate i got the following error :

Zephir\Exception: Cannot parse file: /home/djavolak/progs/celastica/elastica/Exception/Connection/ThriftException.zep

same happened for compile, but i guess the cause is the same so this probably does not matter..

Mentioned file is empty, i tried giving it class name and definiton, based on HttpException.zep from the same folder, and got generate and compile to run, but with tons of errors like

Warning: Unreachable code in /home/djavolak/progs/celastica/elastica/Type.zep

and

/home/djavolak/progs/celastica/ext/elastica/client.c:1289:47: warning: unknown escape sequence: '\A' [enabled by default] /home/djavolak/progs/celastica/ext/elastica/client.c:1293:144: warning: unknown escape sequence: '\L' [enabled by default] ZEPHIR_THROW_EXCEPTION_DEBUG_STR(elastica_exception_runtimeexception_ce, "Class Psr\Log\AbstractLogger not found", "elastica/Client.zep", 684);

my php version is 5.5.11, running on ubuntu 13.10 .

any help/hint is appreciated :)

Please add an issue on Github and will answer there, this is due to Thrift, because its not jet implemented. However there is still work to do, but i am also limited with time so contributions are welcomed.



16.4k

Awesome thanks, we will try it out on our current project ^^



156
Accepted
answer

Issue added :)

I am interested in zephyr, but haven't tried it yet, just looked at phalcon code a bit, so can't help with that yet, but i can try it out and report how it shows in practice :)

Good, thank you, currently working on building extension with Travis-CI. The extension is not jet ready for usage. Unit tests needs to be added too.



3.1k

Is this project pretty much dead now?

Looks like no updates for a couple of years at: https://github.com/nekulin/celastica



15.2k

I've published elasticsearch phalcon adapter, it is based on elasticsearch official php api, if you want to use elasticsearch, you can give a try on my github, https://github.com/code100/ModelElastic. I am sure there will be more room to improve, but it's enough for my project so far.

Is this project pretty much dead now?

Looks like no updates for a couple of years at: https://github.com/nekulin/celastica



16.4k

awesome thanks

I've published elasticsearch phalcon adapter, it is based on elasticsearch official php api, if you want to use elasticsearch, you can give a try on my github, https://github.com/code100/ModelElastic. I am sure there will be more room to improve, but it's enough for my project so far.

Is this project pretty much dead now?

Looks like no updates for a couple of years at: https://github.com/nekulin/celastica