Alien::ElasticSearch 0.05 and ElasticSearch.pm 0.03

Just released Alien::ElasticSearch (version 0.05 on its way to a CPAN near you).

This downloads, builds and installs the latest version of ElasticSearch from GitHub, which makes a live server available for automated testing of....

ElasticSearch.pm v 0.03, also on its way to a CPAN near you.

This version is completely rewritten to to make it easier to extend later (more like one big dispatch table), and has improved debugging, usage messages, errors etc.

Try: (with a server running on localhost)

   use ElasticSearch;
   my $e = ElasticSearch->new( 
         servers  => '127.0.0.1:9200',
         trace_calls => 1,
   );

   $e->nodes;

... prints to STDERR:

curl -XGET 'http://127.0.0.2:9200/_cluster/nodes' 
# {
#    "clusterName" : "elasticsearch",
#    "nodes" : {
#       "getafix-25528" : {
#          "httpAddress" : "inet[/127.0.0.2:9200]",
#          "dataNode" : true,
#          "transportAddress" : "inet[getafix.traveljury.com/127.0.
# >          0.2:9300]",
#          "name" : "Miguel Espinosa"
#       }
#    }
# }

ie, the curl command which allows you rerun your requests directly from the command line, and the ElasticServer response, commented out.

And a test suite, which has helped to find a number of issues (now fixed) in ElasticSearch itself.

I'm thinking of adding an ElasticSearch::QueryBuilder to make it easier to generate the right query structure that Lucene and derivatives expect. (See here for an example of just how convoluted the query structure can be - note, that was my first attempt at a query, not sure if it is correct or not)

Leave a comment

About Clinton Gormley

user-pic The doctor will see you now...