A shell for elasticsearch

Hi all,
I just pushed on github my last experiment: the elasticshell, a shell for
elasticsearch.
It's a javascript shell (written in Java) that allows to interact with a
running elasticsearch cluster. It uses the elasticsearch Java API to do
that, and it allows to execute either Java code or Javascript.

For now I guess it lacks a bit of documentation, but hopefully you can give
it a try. It has nice auto suggestions and should be easy to use if you are
familiar with elasticsearch.
You can find it here: https://github.com/javanna/elasticshell.

I would love to hear what you guys think about it!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Luca, this is real amazing stuff!

Just glanced over the source, will it be possible to integrate other
ScriptEngines (JSR 223) beside Javascript? I think of Jython, JRuby,
Groovy, Clojure ...

I once was thinking of something like "Elasticsearch Server Pages" to
let scripting language folks execute ES functions being embedded in a
node, and extending the HTTP server in ES to something similar to the
vert.x polyglot approach. But due to lack of spare time I never got
closer than firing up ScriptEngines via a plugin...

Jörg

Am 21.02.13 22:32, schrieb Luca Cavanna:

Hi all,
I just pushed on github my last experiment: the elasticshell, a shell
for elasticsearch.
It's a javascript shell (written in Java) that allows to interact with
a running elasticsearch cluster. It uses the elasticsearch Java API to
do that, and it allows to execute either Java code or Javascript.

For now I guess it lacks a bit of documentation, but hopefully you can
give it a try. It has nice auto suggestions and should be easy to use
if you are familiar with elasticsearch.
You can find it here: https://github.com/javanna/elasticshell.

I would love to hear what you guys think about it!

You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

this is so awesome, except for me, it's built for 0.20 (which does make
sense), and I'm still using 0.19 in production.. :frowning:

I've started a fork to try to get it to work with ES 0.19.x series as well,
but due to quite a few things appearing/moving/changing in ES 0.20 it's not
something that is quickly done.

But thanks for this, this will be super-useful!

Paul

On 22 February 2013 09:44, Jörg Prante joergprante@gmail.com wrote:

Luca, this is real amazing stuff!

Just glanced over the source, will it be possible to integrate other
ScriptEngines (JSR 223) beside Javascript? I think of Jython, JRuby,
Groovy, Clojure ...

I once was thinking of something like "Elasticsearch Server Pages" to let
scripting language folks execute ES functions being embedded in a node, and
extending the HTTP server in ES to something similar to the vert.x polyglot
approach. But due to lack of spare time I never got closer than firing up
ScriptEngines via a plugin...

Jörg

Am 21.02.13 22:32, schrieb Luca Cavanna:

Hi all,
I just pushed on github my last experiment: the elasticshell, a shell for
elasticsearch.
It's a javascript shell (written in Java) that allows to interact with a
running elasticsearch cluster. It uses the elasticsearch Java API to do
that, and it allows to execute either Java code or Javascript.

For now I guess it lacks a bit of documentation, but hopefully you can
give it a try. It has nice auto suggestions and should be easy to use if
you are familiar with elasticsearch.
You can find it here: https://github.com/javanna/**elasticshellhttps://github.com/javanna/elasticshell
.

I would love to hear what you guys think about it!

You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@**googlegroups.comelasticsearch%2Bunsubscribe@googlegroups.com
.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@**googlegroups.comelasticsearch%2Bunsubscribe@googlegroups.com
.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Jorg,
glad you liked it.

The main idea was to provide an environment that supports javascript and
the java API as well (you can startup a node client if you want). The power
is being able to write javascript code, but java code as well if you feel
like. All of this works thanks to the Rhino engine. I care about JSON
because of course it's the format supported by elasticsearch and working on
a JSON friendly environment should help writing documents, queries and so
on.
From an elasticsearch perpective it's been more a matter of exposing
clients wrappers / request builders and make them available as objects
within the shell.
But to achieve some of the functionalities (auto suggestions for example) I
had to write some custom code on top of the Rhino engine. I used Rhino as
an external dependency here, no JSR-223. I should be able to update it to
use Nashorn later on, but I haven't considered other scripting languages
for now, even though the Rhino dependent part is pretty isolated and it
seems technically doable. I guess I'll see how many people will use it,
what they'll need and what I can do to make it better.

Cheers

On Thursday, February 21, 2013 11:44:49 PM UTC+1, Jörg Prante wrote:

Luca, this is real amazing stuff!

Just glanced over the source, will it be possible to integrate other
ScriptEngines (JSR 223) beside Javascript? I think of Jython, JRuby,
Groovy, Clojure ...

I once was thinking of something like "Elasticsearch Server Pages" to
let scripting language folks execute ES functions being embedded in a
node, and extending the HTTP server in ES to something similar to the
vert.x polyglot approach. But due to lack of spare time I never got
closer than firing up ScriptEngines via a plugin...

Jörg

Am 21.02.13 22:32, schrieb Luca Cavanna:

Hi all,
I just pushed on github my last experiment: the elasticshell, a shell
for elasticsearch.
It's a javascript shell (written in Java) that allows to interact with
a running elasticsearch cluster. It uses the elasticsearch Java API to
do that, and it allows to execute either Java code or Javascript.

For now I guess it lacks a bit of documentation, but hopefully you can
give it a try. It has nice auto suggestions and should be easy to use
if you are familiar with elasticsearch.
You can find it here: https://github.com/javanna/elasticshell.

I would love to hear what you guys think about it!

You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Paul,
I managed to make it work with 0.19.12. Give it a try and let me know
whether it works fine or you have issues with it! Beware that I had a short
look and made the required changes but not extensively tested it :slight_smile:
You can find a new branch on github or directly the zip file
here: http://www.javanna.net/downloads/elasticshell-0.19.12-SNAPSHOT.zip .

And...if you use it on production be careful with the delete index API as
well as with the node shutdown...they are exposed and pretty dangerous as
you may know.

Have fun!

On Thursday, February 21, 2013 11:51:09 PM UTC+1, tallpsmith wrote:

this is so awesome, except for me, it's built for 0.20 (which does make
sense), and I'm still using 0.19 in production.. :frowning:

I've started a fork to try to get it to work with ES 0.19.x series as
well, but due to quite a few things appearing/moving/changing in ES 0.20
it's not something that is quickly done.

But thanks for this, this will be super-useful!

Paul

On 22 February 2013 09:44, Jörg Prante <joerg...@gmail.com <javascript:>>wrote:

Luca, this is real amazing stuff!

Just glanced over the source, will it be possible to integrate other
ScriptEngines (JSR 223) beside Javascript? I think of Jython, JRuby,
Groovy, Clojure ...

I once was thinking of something like "Elasticsearch Server Pages" to let
scripting language folks execute ES functions being embedded in a node, and
extending the HTTP server in ES to something similar to the vert.x polyglot
approach. But due to lack of spare time I never got closer than firing up
ScriptEngines via a plugin...

Jörg

Am 21.02.13 22:32, schrieb Luca Cavanna:

Hi all,
I just pushed on github my last experiment: the elasticshell, a shell
for elasticsearch.
It's a javascript shell (written in Java) that allows to interact with a
running elasticsearch cluster. It uses the elasticsearch Java API to do
that, and it allows to execute either Java code or Javascript.

For now I guess it lacks a bit of documentation, but hopefully you can
give it a try. It has nice auto suggestions and should be easy to use if
you are familiar with elasticsearch.
You can find it here: https://github.com/javanna/**elasticshellhttps://github.com/javanna/elasticshell
.

I would love to hear what you guys think about it!

You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@**googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@**googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Paul,
I managed to make it work with 0.19.12. I haven't tested it extensively but
seems to work.
There's a new branch on github which you can checkout, otherwise you can
just download the zip file from
here: http://www.javanna.net/downloads/elasticshell-0.19.12-SNAPSHOT.zip .

Have fun and let me know how it went!

On Thursday, February 21, 2013 11:51:09 PM UTC+1, tallpsmith wrote:

this is so awesome, except for me, it's built for 0.20 (which does make
sense), and I'm still using 0.19 in production.. :frowning:

I've started a fork to try to get it to work with ES 0.19.x series as
well, but due to quite a few things appearing/moving/changing in ES 0.20
it's not something that is quickly done.

But thanks for this, this will be super-useful!

Paul

On 22 February 2013 09:44, Jörg Prante <joerg...@gmail.com <javascript:>>wrote:

Luca, this is real amazing stuff!

Just glanced over the source, will it be possible to integrate other
ScriptEngines (JSR 223) beside Javascript? I think of Jython, JRuby,
Groovy, Clojure ...

I once was thinking of something like "Elasticsearch Server Pages" to let
scripting language folks execute ES functions being embedded in a node, and
extending the HTTP server in ES to something similar to the vert.x polyglot
approach. But due to lack of spare time I never got closer than firing up
ScriptEngines via a plugin...

Jörg

Am 21.02.13 22:32, schrieb Luca Cavanna:

Hi all,
I just pushed on github my last experiment: the elasticshell, a shell
for elasticsearch.
It's a javascript shell (written in Java) that allows to interact with a
running elasticsearch cluster. It uses the elasticsearch Java API to do
that, and it allows to execute either Java code or Javascript.

For now I guess it lacks a bit of documentation, but hopefully you can
give it a try. It has nice auto suggestions and should be easy to use if
you are familiar with elasticsearch.
You can find it here: https://github.com/javanna/**elasticshellhttps://github.com/javanna/elasticshell
.

I would love to hear what you guys think about it!

You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@**googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@**googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Luca Cavanna wrote:

I just pushed on github my last experiment: the elasticshell, a
shell for elasticsearch.

This is great Luca! I worked on a similar idea in the past but it
didn't have the flexibility of using a real language.

Looking forward to trying it out.

-Drew

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Great to hear! Let me know what you think after you tried it out
then...there are for sure quite some things that can be improved.

Also, your es2unix is impressive. The idea of getting rid of the json and
show more understandable data is great. I just took another approach: using
json in a json-friendly environment (with auto-complete and so on), even
though I do realize it might not be ideal with big objects.

Cheers

On Friday, February 22, 2013 4:28:02 PM UTC+1, Drew Raines wrote:

Luca Cavanna wrote:

I just pushed on github my last experiment: the elasticshell, a
shell for elasticsearch.

This is great Luca! I worked on a similar idea in the past but it
didn't have the flexibility of using a real language.

Looking forward to trying it out.

-Drew

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

It would be great to incorporate this shell into something like Try
ElasticSearch.

http://try.mongodb.org/
http://console.neo4j.org/

Let anyone play around with a sandbox ElasticSearch cluster from their
browser.

--
Ivan

On Fri, Feb 22, 2013 at 9:00 AM, Luca Cavanna cavannaluca@gmail.com wrote:

Great to hear! Let me know what you think after you tried it out
then...there are for sure quite some things that can be improved.

Also, your es2unix is impressive. The idea of getting rid of the json and
show more understandable data is great. I just took another approach: using
json in a json-friendly environment (with auto-complete and so on), even
though I do realize it might not be ideal with big objects.

Cheers

On Friday, February 22, 2013 4:28:02 PM UTC+1, Drew Raines wrote:

Luca Cavanna wrote:

I just pushed on github my last experiment: the elasticshell, a
shell for elasticsearch.

This is great Luca! I worked on a similar idea in the past but it
didn't have the flexibility of using a real language.

Looking forward to trying it out.

-Drew

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

On 23 February 2013 01:08, Luca Cavanna cavannaluca@gmail.com wrote:

Hi Paul,
I managed to make it work with 0.19.12. Give it a try and let me know
whether it works fine or you have issues with it! Beware that I had a short
look and made the required changes but not extensively tested it :slight_smile:
You can find a new branch on github or directly the zip file here:
http://www.javanna.net/downloads/elasticshell-0.19.12-SNAPSHOT.zip .

And...if you use it on production be careful with the delete index API as
well as with the node shutdown...they are exposed and pretty dangerous as
you may know.

Have fun!

Wow, thank you! Yes the APIs are all exposed, including the dangerous
ones, but no different to us than exposing a SSH port tunnel to use
elasticsearch-head at times too.

this is really helpful for ops folk used to command line tools, and general
simple queries.

thanks again!

Paul

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Well this is great it is something i been hoping someone would make i hope
this gets added the the default project.

On Saturday, February 23, 2013 7:36:52 PM UTC-8, tallpsmith wrote:

On 23 February 2013 01:08, Luca Cavanna <cavan...@gmail.com <javascript:>>wrote:

Hi Paul,
I managed to make it work with 0.19.12. Give it a try and let me know
whether it works fine or you have issues with it! Beware that I had a short
look and made the required changes but not extensively tested it :slight_smile:
You can find a new branch on github or directly the zip file here:
http://www.javanna.net/downloads/elasticshell-0.19.12-SNAPSHOT.zip .

And...if you use it on production be careful with the delete index API as
well as with the node shutdown...they are exposed and pretty dangerous as
you may know.

Have fun!

Wow, thank you! Yes the APIs are all exposed, including the dangerous
ones, but no different to us than exposing a SSH port tunnel to use
elasticsearch-head at times too.

this is really helpful for ops folk used to command line tools, and
general simple queries.

thanks again!

Paul

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks for your feedback, all of you.

Just to keep you posted, I released today the first beta versions,
published the zip files on bintray (while the first snapshots were hosted
on my website) and updated the README file accordingly. Have a look here:
https://github.com/javanna/elasticshell.

There are now two versions available, one for 0.19.x and one for 0.20.x.
Give it a try and let me know how it went. I also plan to blog about it
soon and add some documentation and examples.

Cheers

On Sunday, February 24, 2013 5:03:07 AM UTC+1, Wojons Tech wrote:

Well this is great it is something i been hoping someone would make i hope
this gets added the the default project.

On Saturday, February 23, 2013 7:36:52 PM UTC-8, tallpsmith wrote:

On 23 February 2013 01:08, Luca Cavanna cavan...@gmail.com wrote:

Hi Paul,
I managed to make it work with 0.19.12. Give it a try and let me know
whether it works fine or you have issues with it! Beware that I had a short
look and made the required changes but not extensively tested it :slight_smile:
You can find a new branch on github or directly the zip file here:
http://www.javanna.net/downloads/elasticshell-0.19.12-SNAPSHOT.zip .

And...if you use it on production be careful with the delete index API
as well as with the node shutdown...they are exposed and pretty dangerous
as you may know.

Have fun!

Wow, thank you! Yes the APIs are all exposed, including the dangerous
ones, but no different to us than exposing a SSH port tunnel to use
elasticsearch-head at times too.

this is really helpful for ops folk used to command line tools, and
general simple queries.

thanks again!

Paul

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.