Perl modules. Alien::ElasticSearch v 0.05 and ElasticSearch.pm v 0.03


(Clinton Gormley) #1

Just released Alien::ElasticSearch v 0.05 ( http://search.cpan.org/perldoc?Alien::ElasticSearch
) on its way to a CPAN near you.

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

ElasticSearch.pm v 0.03 (http://search.cpan.org/perldoc?
ElasticSearch), 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
http://groups.google.com/a/elasticsearch.com/group/users/browse_thread/thread/4443e364e543bb53#
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)

clint


(system) #2