Newbies testing out ElasticSearch alternative to Curl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbies testing out ElasticSearch alternative to Curl

Justin Treher
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

Zachary Tong
ElasticSearch-Head (graphical frontend GUI to a cluster) allows you to make arbitrary REST requests:  http://mobz.github.com/elasticsearch-head/

Otherwise, I often use curl via php scripts to test out new queries.

-Zach



On Monday, January 14, 2013 12:26:29 PM UTC-5, [hidden email] wrote:
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

Justin Treher
In reply to this post by Justin Treher
Excellent. That works very well. This is much better than CURL or having a gigantic JSON packet in the URL bar.

Thanks!

On Monday, January 14, 2013 12:26:29 PM UTC-5, [hidden email] wrote:
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

dadoonet
Better is a matter of point of view.
What I love with curl commands is that it allows to create full curl recreation scripts when you need help.


That said, Head is a very cool interface to play with ES! ;-)

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 14 janv. 2013 à 19:26, [hidden email] a écrit :

Excellent. That works very well. This is much better than CURL or having a gigantic JSON packet in the URL bar.

Thanks!

On Monday, January 14, 2013 12:26:29 PM UTC-5, jtr...@gmail.com wrote:
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

Zachary Tong
Yeah, I like raw curl from the command line too.

ES-Head does weird things sometimes, usually if you have a JSON validation error or a mismatched HTTP method (using POST instead of PUT for certain commands).  Instead of returning an error...it just spins forever and shows a blank page.

-Zach



On Monday, January 14, 2013 1:42:42 PM UTC-5, David Pilato wrote:
Better is a matter of point of view.
What I love with curl commands is that it allows to create full curl recreation scripts when you need help.


That said, Head is a very cool interface to play with ES! ;-)

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 14 janv. 2013 à 19:26, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="pdzjvCdHJjgJ">jtr...@... a écrit :

Excellent. That works very well. This is much better than CURL or having a gigantic JSON packet in the URL bar.

Thanks!

On Monday, January 14, 2013 12:26:29 PM UTC-5, jtr...@gmail.com wrote:
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

Justin Treher
In reply to this post by dadoonet
I hear you on "better." I'm still in the "what the....?" phase. I'm sure curl will be preferred once I'm no longer working with heavy web examples.

That being said, how the heck do I get this to work correctly? I'm not sure how to provide parameters for "playground testing" via the _analyze API.

localhost:9200/_analyze?tokenizer=edgeNGram&min_gram=1&max_gram=20&text=something

On Monday, January 14, 2013 1:42:42 PM UTC-5, David Pilato wrote:
Better is a matter of point of view.
What I love with curl commands is that it allows to create full curl recreation scripts when you need help.


That said, Head is a very cool interface to play with ES! ;-)

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 14 janv. 2013 à 19:26, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="pdzjvCdHJjgJ">jtr...@... a écrit :

Excellent. That works very well. This is much better than CURL or having a gigantic JSON packet in the URL bar.

Thanks!

On Monday, January 14, 2013 12:26:29 PM UTC-5, jtr...@gmail.com wrote:
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

Zachary Tong
I don't believe you can specify tokenizer settings directly through the _Analyze API.  You could do:

curl -X GET "localhost:9200/_analyze?tokenizer=edgeNGram" -d "this is example text"

...but that will use the defaults for edgeNGram (min_gram = 1, etc).  Or you could use an custom analyzer which sets the appropriate settings.  Note that this query uses a test index, since analyzer mappings are per-index:

curl -X GET "localhost:9200/test/_analyze?analyzer=analyzer_edgeNGram" -d "this is example text"

-Zach

 
On Monday, January 14, 2013 4:22:57 PM UTC-5, [hidden email] wrote:
I hear you on "better." I'm still in the "what the....?" phase. I'm sure curl will be preferred once I'm no longer working with heavy web examples.

That being said, how the heck do I get this to work correctly? I'm not sure how to provide parameters for "playground testing" via the _analyze API.

localhost:9200/_analyze?tokenizer=edgeNGram&min_gram=1&max_gram=20&text=something

On Monday, January 14, 2013 1:42:42 PM UTC-5, David Pilato wrote:
Better is a matter of point of view.
What I love with curl commands is that it allows to create full curl recreation scripts when you need help.


That said, Head is a very cool interface to play with ES! ;-)

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 14 janv. 2013 à 19:26, [hidden email] a écrit :

Excellent. That works very well. This is much better than CURL or having a gigantic JSON packet in the URL bar.

Thanks!

On Monday, January 14, 2013 12:26:29 PM UTC-5, jtr...@gmail.com wrote:
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

Justin Treher
Setting up a custom analyzer first worked great. The most confusing part of this for me is certainly the idea of creating everything from scratch for every change. With Solr, I just tweak an XML and issue a reload. Do you guys keep standard config JSON in a custom file that your application uses as needed to rebuild or modify?

On Monday, January 14, 2013 4:51:34 PM UTC-5, Zachary Tong wrote:
I don't believe you can specify tokenizer settings directly through the _Analyze API.  You could do:

curl -X GET "localhost:9200/_analyze?tokenizer=edgeNGram" -d "this is example text"

...but that will use the defaults for edgeNGram (min_gram = 1, etc).  Or you could use an custom analyzer which sets the appropriate settings.  Note that this query uses a test index, since analyzer mappings are per-index:

curl -X GET "localhost:9200/test/_analyze?analyzer=analyzer_edgeNGram" -d "this is example text"

-Zach

 
On Monday, January 14, 2013 4:22:57 PM UTC-5, [hidden email] wrote:
I hear you on "better." I'm still in the "what the....?" phase. I'm sure curl will be preferred once I'm no longer working with heavy web examples.

That being said, how the heck do I get this to work correctly? I'm not sure how to provide parameters for "playground testing" via the _analyze API.

localhost:9200/_analyze?tokenizer=edgeNGram&min_gram=1&max_gram=20&text=something

On Monday, January 14, 2013 1:42:42 PM UTC-5, David Pilato wrote:
Better is a matter of point of view.
What I love with curl commands is that it allows to create full curl recreation scripts when you need help.


That said, Head is a very cool interface to play with ES! ;-)

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 14 janv. 2013 à 19:26, [hidden email] a écrit :

Excellent. That works very well. This is much better than CURL or having a gigantic JSON packet in the URL bar.

Thanks!

On Monday, January 14, 2013 12:26:29 PM UTC-5, jtr...@gmail.com wrote:
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

Zachary Tong
You can use the Template API to manage a file-based template which is applied to new indicies matching certain patterns.  Handy for programatically creating indices  such as daily log indices.

-Z



On Tuesday, January 15, 2013 9:12:00 AM UTC-5, [hidden email] wrote:
Setting up a custom analyzer first worked great. The most confusing part of this for me is certainly the idea of creating everything from scratch for every change. With Solr, I just tweak an XML and issue a reload. Do you guys keep standard config JSON in a custom file that your application uses as needed to rebuild or modify?

On Monday, January 14, 2013 4:51:34 PM UTC-5, Zachary Tong wrote:
I don't believe you can specify tokenizer settings directly through the _Analyze API.  You could do:

curl -X GET "localhost:9200/_analyze?tokenizer=edgeNGram" -d "this is example text"

...but that will use the defaults for edgeNGram (min_gram = 1, etc).  Or you could use an custom analyzer which sets the appropriate settings.  Note that this query uses a test index, since analyzer mappings are per-index:

curl -X GET "localhost:9200/test/_analyze?analyzer=analyzer_edgeNGram" -d "this is example text"

-Zach

 
On Monday, January 14, 2013 4:22:57 PM UTC-5, [hidden email] wrote:
I hear you on "better." I'm still in the "what the....?" phase. I'm sure curl will be preferred once I'm no longer working with heavy web examples.

That being said, how the heck do I get this to work correctly? I'm not sure how to provide parameters for "playground testing" via the _analyze API.

localhost:9200/_analyze?tokenizer=edgeNGram&min_gram=1&max_gram=20&text=something

On Monday, January 14, 2013 1:42:42 PM UTC-5, David Pilato wrote:
Better is a matter of point of view.
What I love with curl commands is that it allows to create full curl recreation scripts when you need help.


That said, Head is a very cool interface to play with ES! ;-)

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 14 janv. 2013 à 19:26, [hidden email] a écrit :

Excellent. That works very well. This is much better than CURL or having a gigantic JSON packet in the URL bar.

Thanks!

On Monday, January 14, 2013 12:26:29 PM UTC-5, jtr...@gmail.com wrote:
Hi! 

I have ElasticSearch running in my linux VM to test drive this alternative to SOLR. I'd really prefer just to use a REST "tester" client such as Poster for FireFox rather than retyping examples into curl or the annoying issues with copy/paste into bash shell. I've tried most of the other addins and none of them support sending body with a GET. They only seem to allow payload for PUT and POST.

What do you use other than Curl available as a browser extension or windows software?


--
 
 

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Newbies testing out ElasticSearch alternative to Curl

phill
In reply to this post by Justin Treher
As a windows user I went through the same thing, but finally decided
that the right thing to do was to leverage all the Linux knowledge out
there.

(1) install cygwin with curl and various other networking parts (I just
picked a generous set of extra category installs since I had plenty of
disk space).  It sounds as if you have this since you said bash shell.

(2) write trivial shell scripts that contain nearly nothing but curl
commands.  Since I was writing these in my IDE and smart editors of
choice and was learning, I certainly didn't want to throw anything away,
so I was not doing any cut and paste of examples except into editors.

(3) run the shell scripts from the cygwin command window.  Not by cut
and paste, but by navigating to where ever I keep them in my source tree
and picking one.

I also use head exploring search queries very often, but I generally use
scripts + cygwin for various other things like index create/configure
commands.  Most of the search queries I end up pasting from a toString()
in my IDE, pasting into head|Any Request, trying, editing it, trying
again and again and again to understand what is going on, so I don't
find it handy to scroll back through many experiments to find the index
delete then scroll back again to find the index create command.

-Paul

On 1/14/2013 9:26 AM, [hidden email] wrote:

> Hi!
>
> I have ElasticSearch running in my linux VM to test drive this
> alternative to SOLR. I'd really prefer just to use a REST "tester"
> client such as Poster for FireFox rather than retyping examples into
> curl or the annoying issues with copy/paste into bash shell. I've
> tried most of the other addins and none of them support sending body
> with a GET. They only seem to allow payload for PUT and POST.
>
> What do you use other than Curl available as a browser extension or
> windows software?
>

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.