# Simple query doesn't do anything

**URL:** <https://discuss.elastic.co/t/simple-query-doesnt-do-anything/7845>\
**Category:** Elasticsearch\
**Created:** [May 24, 2012, 4:37pm UTC](https://discuss.elastic.co/t/simple-query-doesnt-do-anything/7845 "2012-05-24T16:37:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_3](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@David\_3](https://discuss.elastic.co/u/David_3)\
**Post date:** [May 24, 2012, 4:37pm UTC](https://discuss.elastic.co/t/simple-query-doesnt-do-anything/7845/1 "2012-05-24T16:37:51Z")

</div>

I'm new to elasticsearch and I'm using the embedded version for the  
play framework.  
I'm trying out a simple search example which I took from another  
thread in this group.

first I create a new index..  
$ curl -XPUT 127.0.0.1:9200/test\_index/test\_type/1?pretty -d  
'{ "name": "The  
Times" }';  
{  
"ok" : true,  
"\_index" : "test\_index",  
"\_type" : "test\_type",  
"\_id" : "1",  
"\_version" : 1

}

Then I try to search for the text included during index creation:  
$ curl -XGET 127.0.0.1:9200/test\_index/test\_type/\_search?pretty -d  
'{"query":{"query\_string":{"query":"the  
times\*","default\_operator":"AND",  
"analyze\_wildcard": "true" }}}'

It doesn't return anything.. just hangs.  
I'm using the admin interface to make the calls:  
[http://locahost:9000/es-admin](http://locahost:9000/es-admin)

---

<div class="post-metadata">

**Author:** ![Shane\_Witbeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shane_witbeck/32/2803_2.png) [@Shane\_Witbeck](https://discuss.elastic.co/u/Shane_Witbeck)\
**Post date:** [May 24, 2012, 8:12pm UTC](https://discuss.elastic.co/t/simple-query-doesnt-do-anything/7845/2 "2012-05-24T20:12:12Z")

</div>

Hi David,

I just happened to see this post and your reference to "es-admin" (I assume  
you are referring to [https://github.com/digitalsanctum/es-admin](https://github.com/digitalsanctum/es-admin)). That's  
actually a pet project of mine that really isn't ready for prime time.

Instead of es-admin, I suggest using either curl from the command line or  
the excellent elasticsearch-head plugin found here:

[https://github.com/Aconex/elasticsearch-head](https://github.com/Aconex/elasticsearch-head)

HTH,  
Shane

On Thursday, May 24, 2012 12:37:51 PM UTC-4, David wrote:

> I'm new to elasticsearch and I'm using the embedded version for the  
> play framework.  
> I'm trying out a simple search example which I took from another  
> thread in this group.
> 
> first I create a new index..  
> $ curl -XPUT 127.0.0.1:9200/test\_index/test\_type/1?pretty -d  
> '{ "name": "The  
> Times" }';  
> {  
> "ok" : true,  
> "\_index" : "test\_index",  
> "\_type" : "test\_type",  
> "\_id" : "1",  
> "\_version" : 1
> 
> }
> 
> Then I try to search for the text included during index creation:  
> $ curl -XGET 127.0.0.1:9200/test\_index/test\_type/\_search?pretty -d  
> '{"query":{"query\_string":{"query":"the  
> times\*","default\_operator":"AND",  
> "analyze\_wildcard": "true" }}}'
> 
> It doesn't return anything.. just hangs.  
> I'm using the admin interface to make the calls:  
> [http://locahost:9000/es-admin](http://locahost:9000/es-admin)

---

<div class="post-metadata">

**Author:** ![David\_3](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@David\_3](https://discuss.elastic.co/u/David_3)\
**Post date:** [May 24, 2012, 8:34pm UTC](https://discuss.elastic.co/t/simple-query-doesnt-do-anything/7845/3 "2012-05-24T20:34:25Z")

</div>

A few other issues I've run into.. when I have a MySQL database  
indexed and I use the default wildcard search ''  
provided with the embedded elasticsearch for play! framework the  
search will only match when it is an incomplete word like 'uide' when  
the full string is 'The Guide' so full text search doesn't seem to be  
working.  
I figure this is because the indexed data has not been analysed but  
how to know? What is the easiest way to check?  
Do you have to configure an analyser or is there a default analyser  
used which does not show up in the node meta-data which automagically  
does the analysis?

Also how do you get a handle on the default node which is listening on  
port 9200? I tried using the Node and Client classes but it just  
created a new node each time.

---

<div class="post-metadata">

**Author:** ![David\_3](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@David\_3](https://discuss.elastic.co/u/David_3)\
**Post date:** [May 24, 2012, 8:50pm UTC](https://discuss.elastic.co/t/simple-query-doesnt-do-anything/7845/4 "2012-05-24T20:50:13Z")

</div>

The es-admin interface is included in the embedded version of  
elasticsearch by default.  
Not sure if it is the same project.. I installed elasticsearch-head  
and it looks a lot like the es-admin page I am using with some extras  
included.

On May 24, 9:12 pm, Shane Witbeck [sh...@digitalsanctum.com](mailto:sh...@digitalsanctum.com) wrote:

> Hi David,
> 
> I just happened to see this post and your reference to "es-admin" (I assume  
> you are referring tohttps://github.com/digitalsanctum/es-admin). That's  
> actually a pet project of mine that really isn't ready for prime time.
> 
> Instead of es-admin, I suggest using either curl from the command line or  
> the excellent elasticsearch-head plugin found here:
> 
> [https://github.com/Aconex/elasticsearch-head](https://github.com/Aconex/elasticsearch-head)
> 
> HTH,  
> Shane
> 
> On Thursday, May 24, 2012 12:37:51 PM UTC-4, David wrote:
> 
> > I'm new to elasticsearch and I'm using the embedded version for the  
> > play framework.  
> > I'm trying out a simple search example which I took from another  
> > thread in this group.
> 
> > first I create a new index..  
> > $ curl -XPUT 127.0.0.1:9200/test\_index/test\_type/1?pretty -d  
> > '{ "name": "The  
> > Times" }';  
> > {  
> > "ok" : true,  
> > "\_index" : "test\_index",  
> > "\_type" : "test\_type",  
> > "\_id" : "1",  
> > "\_version" : 1
> 
> > }
> 
> > Then I try to search for the text included during index creation:  
> > $ curl -XGET 127.0.0.1:9200/test\_index/test\_type/\_search?pretty -d  
> > '{"query":{"query\_string":{"query":"the  
> > times\*","default\_operator":"AND",  
> > "analyze\_wildcard": "true" }}}'
> 
> > It doesn't return anything.. just hangs.  
> > I'm using the admin interface to make the calls:  
> > [http://locahost:9000/es-admin](http://locahost:9000/es-admin)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:27am UTC](https://discuss.elastic.co/t/simple-query-doesnt-do-anything/7845/5 "2017-07-06T03:27:11Z")

</div>


