Perl API for ElasticSearch


(Clinton Gormley) #1

Hiya

I've just released a Perl API for ElasticSearch which can be found
here: http://search.cpan.org/~drtech/ElasticSearch-0.01/

I've tried to make the interface pretty similar to the existing JSON
API - feedback welcome.

One nice thing that ElasticSearch.pm does is to retrieve a list of all
available nodes in the ElasticSearch cluster, and tries to spread the
load across nodes automatically.

Also, if the current node disappears, then it tries to connect to the
other nodes that it knows about. Only if no other nodes are available
does it fail.

Blog post about it here: http://blogs.perl.org/users/clinton_gormley/2010/02/perl-api-for-elasticsearch.html

I'd especially welcome feedback about the search() interface - just
after releasing it, i saw some docs about facets, which I don't think
my current API supports.

I've never used Lucene, so some practical examples of typical queries
would be handy

thanks

Clint


(Shay Banon) #2

Great job Clinton! I'll be honest here, the Perl code always managed to look
cryptic to me, but its just great!. I am adding more APIs as I speak to
#elasticsearch, so the fun never stops :slight_smile:

-shay.banon

On Mon, Feb 15, 2010 at 9:25 PM, Clinton clinton@iannounce.co.uk wrote:

Hiya

I've just released a Perl API for ElasticSearch which can be found
here: http://search.cpan.org/~drtech/ElasticSearch-0.01/

I've tried to make the interface pretty similar to the existing JSON
API - feedback welcome.

One nice thing that ElasticSearch.pm does is to retrieve a list of all
available nodes in the ElasticSearch cluster, and tries to spread the
load across nodes automatically.

Also, if the current node disappears, then it tries to connect to the
other nodes that it knows about. Only if no other nodes are available
does it fail.

Blog post about it here:
http://blogs.perl.org/users/clinton_gormley/2010/02/perl-api-for-elasticsearch.html

I'd especially welcome feedback about the search() interface - just
after releasing it, i saw some docs about facets, which I don't think
my current API supports.

I've never used Lucene, so some practical examples of typical queries
would be handy

thanks

Clint


(Clinton Gormley) #3

On Mon, 2010-02-15 at 21:45 +0200, Shay Banon wrote:

Great job Clinton! I'll be honest here, the Perl code always managed
to look cryptic to me, but its just great!. I am adding more APIs as I
speak to #elasticsearch, so the fun never stops :slight_smile:

What's the best way to keep up to date with the changes that you add to
trunk? I'm following your git repo, but what about an announcements
mailing list?

Speaking of github, I've put ElasticSearch.pm there as well:

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(Shay Banon) #4

All changes that users need to know about will be raised as issues so all
you need is follow the issues. Regarding the github repo, great, its much
easier with git :), but, I have a personal request, if you don't mind. Is
there a chance that you can change the name? People will get confused with
ElasticSearch (the repo and user) and your ElasticSearch I think. We need to
come up with good client names for elasticsearch, something like: perles
(the web 2.0 name, pearls, just without the a and add an e :slight_smile: ). Someone on
the userlist has an idea?

-shay.banon

On Mon, Feb 15, 2010 at 9:57 PM, Clinton Gormley clinton@iannounce.co.ukwrote:

On Mon, 2010-02-15 at 21:45 +0200, Shay Banon wrote:

Great job Clinton! I'll be honest here, the Perl code always managed
to look cryptic to me, but its just great!. I am adding more APIs as I
speak to #elasticsearch, so the fun never stops :slight_smile:

What's the best way to keep up to date with the changes that you add to
trunk? I'm following your git repo, but what about an announcements
mailing list?

Speaking of github, I've put ElasticSearch.pm there as well:

http://github.com/clintongormley/ElasticSearch

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(Lukáš Vlček) #5

Perles makes it for a nice name. And how about Esperlanto ?

es - that is clear, perl - as well, anto - just a suffix to make it sound
like esperanto. If you put perl next to esperanto then you have interesting
analogy. Both languages are universal and hardly readable :slight_smile:

Disclaimer: I have high respect for anybody who can speak/read any of the
mentioned languages!

Rgds,
Lukas

On Mon, Feb 15, 2010 at 9:02 PM, Shay Banon shay.banon@elasticsearch.comwrote:

All changes that users need to know about will be raised as issues so all
you need is follow the issues. Regarding the github repo, great, its much
easier with git :), but, I have a personal request, if you don't mind. Is
there a chance that you can change the name? People will get confused with
ElasticSearch (the repo and user) and your ElasticSearch I think. We need to
come up with good client names for elasticsearch, something like: perles
(the web 2.0 name, pearls, just without the a and add an e :slight_smile: ). Someone on
the userlist has an idea?

-shay.banon

On Mon, Feb 15, 2010 at 9:57 PM, Clinton Gormley clinton@iannounce.co.ukwrote:

On Mon, 2010-02-15 at 21:45 +0200, Shay Banon wrote:

Great job Clinton! I'll be honest here, the Perl code always managed
to look cryptic to me, but its just great!. I am adding more APIs as I
speak to #elasticsearch, so the fun never stops :slight_smile:

What's the best way to keep up to date with the changes that you add to
trunk? I'm following your git repo, but what about an announcements
mailing list?

Speaking of github, I've put ElasticSearch.pm there as well:

http://github.com/clintongormley/ElasticSearch

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(Clinton Gormley) #6

On Mon, 2010-02-15 at 22:02 +0200, Shay Banon wrote:

All changes that users need to know about will be raised as issues so
all you need is follow the issues. Regarding the github repo, great,
its much easier with git :), but, I have a personal request, if you
don't mind. Is there a chance that you can change the name? People
will get confused with ElasticSearch (the repo and user) and your
ElasticSearch I think.

Yeah - it's my first time using github, and originally I called it
ElasticSearch.pm, but then changed it because it used that as a
directory name. but actually shouldn't be an issue.

So, updated to: http://github.com/clintongormley/ElasticSearch.pm

clint

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(Clinton Gormley) #7

On Mon, 2010-02-15 at 21:15 +0100, Lukáš Vlček wrote:

Perles makes it for a nice name. And how about Esperlanto ?

From a Perl user's point of view, those names don't mean much.
ElasticSearch.pm is recognisable to Perl'ers.

Both languages are universal and hardly readable :slight_smile:

Harumph....

Disclaimer: I have high respect for anybody who can speak/read any of
the mentioned languages!

JUST as well! :wink:

--
Web Announcements Limited is a company registered in England and Wales,
with company number 05608868, with registered address at 10 Arvon Road,
London, N5 1PR.


(system) #8