# ElasticSearch-head not working for newbie on 1-doc index

**URL:** <https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737>\
**Category:** Elasticsearch\
**Created:** [February 14, 2013, 3:18am UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737 "2013-02-14T03:18:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![caymanag](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@caymanag](https://discuss.elastic.co/u/caymanag)\
**Post date:** [February 14, 2013, 3:18am UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/1 "2013-02-14T03:18:54Z")

</div>

Hi, I am new to ES and ES-head. I just downloaded ES 0.20.4. I just  
installed ES-head, both as a plugin and manual download. I created a new  
index called twitter with type tweet, and inserted one document: { user :  
"kimchy", message : "first tweet by me" }. I can search for and return  
this document using curl.

[http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/) shows me the index. The Browser tab  
shows the correct indices (twitter), types(tweet) and Fields(message and  
user). However, I am unable to get any search results to show up. If I  
click on user and type in the field kimchy I don't see any results.  
However, if I type in something other than kimchy, say the letter x, then I  
immediately see: "Searched 5 of 5 shards, 0 hits, 0.001 seconds"  
Underneath that I see "\_index \_type \_id \_score" as if it were a table.

Similarly, if I use the Structured Query+ tab, I enter for must: tweet.user  
and for term: kimchy. After I press the Search button, I see  
"Searching..." but no results.

I have installed ES-head both from plugin and manually, both with the same  
results. I am using os x lion and I have tried safari, ffox, chrome, all  
with the same results.

Thank you.

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mobz\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mobz_2/32/2473_2.png) [@mobz\_2](https://discuss.elastic.co/u/mobz_2)\
**Post date:** [February 14, 2013, 4:08am UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/2 "2013-02-14T04:08:08Z")

</div>

Hi, It looks like head is not able to show results for some reason -  
possibly a javascript error. Can you let me know if there are any errors in  
the javascript console.

-B

On Thursday, 14 February 2013 14:18:54 UTC+11, Cayman wrote:

> Hi, I am new to ES and ES-head. I just downloaded ES 0.20.4. I just  
> installed ES-head, both as a plugin and manual download. I created a new  
> index called twitter with type tweet, and inserted one document: { user :  
> "kimchy", message : "first tweet by me" }. I can search for and return  
> this document using curl.
> 
> [http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/) shows me the index. The Browser tab  
> shows the correct indices (twitter), types(tweet) and Fields(message and  
> user). However, I am unable to get any search results to show up. If I  
> click on user and type in the field kimchy I don't see any results.  
> However, if I type in something other than kimchy, say the letter x, then I  
> immediately see: "Searched 5 of 5 shards, 0 hits, 0.001 seconds"  
> Underneath that I see "\_index \_type \_id \_score" as if it were a table.
> 
> Similarly, if I use the Structured Query+ tab, I enter for must:  
> tweet.user and for term: kimchy. After I press the Search button, I see  
> "Searching..." but no results.
> 
> I have installed ES-head both from plugin and manually, both with the same  
> results. I am using os x lion and I have tried safari, ffox, chrome, all  
> with the same results.
> 
> Thank you.

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![caymanag](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@caymanag](https://discuss.elastic.co/u/caymanag)\
**Post date:** [February 14, 2013, 4:30am UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/3 "2013-02-14T04:30:39Z")

</div>

In FFox I see the following:

1. when I used the Structured Query I see this error  
[23:18:25.130] POST [http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search) [HTTP/1.1 200 OK  
2ms]  
[23:18:25.079] SyntaxError: JSON.parse: expected property name or '}' @  
[http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js:553](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js:553)  
Here is my line 553:

Line 551: // Attempt to parse using the native JSON parser first  
Line 552: if ( window.JSON && window.JSON.parse ) {  
Line 553: return window.JSON.parse( data );  
Line 554: }

1. when I use the Browser tab I press Refresh and I see this  
[23:13:49.455] POST [http://localhost:9200/\_all/\_search](http://localhost:9200/_all/_search) [HTTP/1.1 200 OK 2ms]  
[23:13:49.404] ({'XHR Error':"parsererror", message:(new  
SyntaxError("JSON.parse: expected property name or '}'",  
"[http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)", 553))})  
There is a hyperlink for core.js:83. If I display this line I see:

console.log({ "XHR Error": type, "message": message }); (looks ok to me) Here is the complete function from core.js

request: function(params) {  
return $.ajax(acx.extend({  
url: this.config.base\_uri + params.path,  
dataType: "json",  
error: function(xhr, type, message) {  
if("console" in window) {  
console.log({ "XHR Error": type, "message": message });  
}  
}  
}, params));  
},

Similarly, if I don't use the plugin, I see the following error (this time  
in Safari) on the Browser tab  
Object  
XHR Error: "parsererror"  
message: Error  
line: 553  
message: "JSON Parse error: Expected '}'"  
sourceURL:  
"file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js"  
stack: "parse@[native  
code]↵parseJSON@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:553↵ajaxConvert@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7549↵done@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7101↵callback@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7907↵[native  
code]"  
**proto** : Error  
**proto** : Object

Thank you

On Wednesday, February 13, 2013 11:08:08 PM UTC-5, mobz wrote:

> Hi, It looks like head is not able to show results for some reason -  
> possibly a javascript error. Can you let me know if there are any errors in  
> the javascript console.
> 
> -B
> 
> On Thursday, 14 February 2013 14:18:54 UTC+11, Cayman wrote:
> 
> > Hi, I am new to ES and ES-head. I just downloaded ES 0.20.4. I just  
> > installed ES-head, both as a plugin and manual download. I created a new  
> > index called twitter with type tweet, and inserted one document: { user :  
> > "kimchy", message : "first tweet by me" }. I can search for and return  
> > this document using curl.
> > 
> > [http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/) shows me the index. The Browser tab  
> > shows the correct indices (twitter), types(tweet) and Fields(message and  
> > user). However, I am unable to get any search results to show up. If I  
> > click on user and type in the field kimchy I don't see any results.  
> > However, if I type in something other than kimchy, say the letter x, then I  
> > immediately see: "Searched 5 of 5 shards, 0 hits, 0.001 seconds"  
> > Underneath that I see "\_index \_type \_id \_score" as if it were a table.
> > 
> > Similarly, if I use the Structured Query+ tab, I enter for must:  
> > tweet.user and for term: kimchy. After I press the Search button, I see  
> > "Searching..." but no results.
> > 
> > I have installed ES-head both from plugin and manually, both with the  
> > same results. I am using os x lion and I have tried safari, ffox, chrome,  
> > all with the same results.
> > 
> > Thank you.

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mobz\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mobz_2/32/2473_2.png) [@mobz\_2](https://discuss.elastic.co/u/mobz_2)\
**Post date:** [February 15, 2013, 12:15am UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/4 "2013-02-15T00:15:32Z")

</div>

I have attempted to reproduce the problem using a new cluster and a the  
data you specify with es 0.20.4 and can not (it works as expected). It  
looks from above like there might be a problem with the json that es is  
producing? In chrome, can you open the 'network' debugging tab and copy the  
request / response to the request to [http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search) that  
is causing the error.

On Thursday, 14 February 2013 15:30:39 UTC+11, Cayman wrote:

> In FFox I see the following:
> 
> 1. when I used the Structured Query I see this error  
> [23:18:25.130] POST [http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search) [HTTP/1.1 200  
> OK 2ms]  
> [23:18:25.079] SyntaxError: JSON.parse: expected property name or '}' @  
> [http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js:553](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js:553)  
> Here is my line 553:
> 
> Line 551: // Attempt to parse using the native JSON parser first  
> Line 552: if ( window.JSON && window.JSON.parse ) {  
> Line 553: return window.JSON.parse( data );  
> Line 554: }
> 
> 1. when I use the Browser tab I press Refresh and I see this  
> [23:13:49.455] POST [http://localhost:9200/\_all/\_search](http://localhost:9200/_all/_search) [HTTP/1.1 200 OK  
> 2ms]  
> [23:13:49.404] ({'XHR Error':"parsererror", message:(new  
> SyntaxError("JSON.parse: expected property name or '}'", "  
> [http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)", 553))})  
> There is a hyperlink for core.js:83. If I display this line I see:
> 
> console.log({ "XHR Error": type, "message": message }); (looks ok to me) Here is the complete function from core.js
> 
> request: function(params) {  
> return $.ajax(acx.extend({  
> url: this.config.base\_uri + params.path,  
> dataType: "json",  
> error: function(xhr, type, message) {  
> if("console" in window) {  
> console.log({ "XHR Error": type, "message": message });  
> }  
> }  
> }, params));  
> },
> 
> Similarly, if I don't use the plugin, I see the following error (this time  
> in Safari) on the Browser tab  
> Object  
> XHR Error: "parsererror"  
> message: Error  
> line: 553  
> message: "JSON Parse error: Expected '}'"  
> sourceURL:  
> "file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js"  
> stack: "parse@[native  
> code]↵parseJSON@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:553↵ajaxConvert@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7549↵done@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7101↵callback@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7907↵[native  
> code]"  
> **proto** : Error  
> **proto** : Object
> 
> Thank you
> 
> On Wednesday, February 13, 2013 11:08:08 PM UTC-5, mobz wrote:
> 
> > Hi, It looks like head is not able to show results for some reason -  
> > possibly a javascript error. Can you let me know if there are any errors in  
> > the javascript console.
> > 
> > -B
> > 
> > On Thursday, 14 February 2013 14:18:54 UTC+11, Cayman wrote:
> > 
> > > Hi, I am new to ES and ES-head. I just downloaded ES 0.20.4. I just  
> > > installed ES-head, both as a plugin and manual download. I created a new  
> > > index called twitter with type tweet, and inserted one document: { user :  
> > > "kimchy", message : "first tweet by me" }. I can search for and return  
> > > this document using curl.
> > > 
> > > [http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/) shows me the index. The Browser  
> > > tab shows the correct indices (twitter), types(tweet) and Fields(message  
> > > and user). However, I am unable to get any search results to show up. If I  
> > > click on user and type in the field kimchy I don't see any results.  
> > > However, if I type in something other than kimchy, say the letter x, then I  
> > > immediately see: "Searched 5 of 5 shards, 0 hits, 0.001 seconds"  
> > > Underneath that I see "\_index \_type \_id \_score" as if it were a table.
> > > 
> > > Similarly, if I use the Structured Query+ tab, I enter for must:  
> > > tweet.user and for term: kimchy. After I press the Search button, I see  
> > > "Searching..." but no results.
> > > 
> > > I have installed ES-head both from plugin and manually, both with the  
> > > same results. I am using os x lion and I have tried safari, ffox, chrome,  
> > > all with the same results.
> > > 
> > > Thank you.

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![caymanag](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@caymanag](https://discuss.elastic.co/u/caymanag)\
**Post date:** [February 15, 2013, 2:08pm UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/5 "2013-02-15T14:08:44Z")

</div>

The response from the server looks completely correct. Under the Browser  
tab, if I type the letters k,i,m,c,h,y then I get back the single document:  
{"took":4,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max\_score":1.0,"hits":[{"\_index":"twitter","\_type":"tweet","\_id":"1","\_version":1,"\_score":1.0,  
"\_source" :  
{  
user : "kimchy",  
message : "first tweet by me"  
}}]}}

There are still no search results shown in the browser window

Anytime I enter an incorrect character, say kimchyx, I get:  
{"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}

In the browser window I now see the following:  
Searched 5 of 5 shards. 0 hits. 0.001 seconds  
\_index  
\_type  
\_id  
▼  
\_score

Similarly, under the Structured Search tab, the Network shows correct  
results being returned:  
{"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max\_score":1.0,"hits":[{"\_index":"twitter","\_type":"tweet","\_id":"1","\_score":1.0,  
"\_source" :  
{  
user : "kimchy",  
message : "first tweet by me"  
}}]}}

However, the UI only shows: Searching...

I hope this helps. Thank you.

On Thursday, February 14, 2013 7:15:32 PM UTC-5, mobz wrote:

> I have attempted to reproduce the problem using a new cluster and a the  
> data you specify with es 0.20.4 and can not (it works as expected). It  
> looks from above like there might be a problem with the json that es is  
> producing? In chrome, can you open the 'network' debugging tab and copy the  
> request / response to the request to  
> [http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search) that is causing the error.
> 
> On Thursday, 14 February 2013 15:30:39 UTC+11, Cayman wrote:
> 
> > In FFox I see the following:
> > 
> > 1. when I used the Structured Query I see this error  
> > [23:18:25.130] POST [http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search) [HTTP/1.1 200  
> > OK 2ms]  
> > [23:18:25.079] SyntaxError: JSON.parse: expected property name or '}' @  
> > [http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js:553](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js:553)  
> > Here is my line 553:
> > 
> > Line 551: // Attempt to parse using the native JSON parser first  
> > Line 552: if ( window.JSON && window.JSON.parse ) {  
> > Line 553: return window.JSON.parse( data );  
> > Line 554: }
> > 
> > 1. when I use the Browser tab I press Refresh and I see this  
> > [23:13:49.455] POST [http://localhost:9200/\_all/\_search](http://localhost:9200/_all/_search) [HTTP/1.1 200 OK  
> > 2ms]  
> > [23:13:49.404] ({'XHR Error':"parsererror", message:(new  
> > SyntaxError("JSON.parse: expected property name or '}'", "  
> > [http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)", 553))})  
> > There is a hyperlink for core.js:83. If I display this line I see:
> > 
> > console.log({ "XHR Error": type, "message": message }); (looks ok to me) Here is the complete function from core.js
> > 
> > request: function(params) {  
> > return $.ajax(acx.extend({  
> > url: this.config.base\_uri + params.path,  
> > dataType: "json",  
> > error: function(xhr, type, message) {  
> > if("console" in window) {  
> > console.log({ "XHR Error": type, "message": message });  
> > }  
> > }  
> > }, params));  
> > },
> > 
> > Similarly, if I don't use the plugin, I see the following error (this  
> > time in Safari) on the Browser tab  
> > Object  
> > XHR Error: "parsererror"  
> > message: Error  
> > line: 553  
> > message: "JSON Parse error: Expected '}'"  
> > sourceURL:  
> > "file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js"  
> > stack: "parse@[native  
> > code]↵parseJSON@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:553↵ajaxConvert@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7549↵done@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7101↵callback@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7907↵[native  
> > code]"  
> > **proto** : Error  
> > **proto** : Object
> > 
> > Thank you
> > 
> > On Wednesday, February 13, 2013 11:08:08 PM UTC-5, mobz wrote:
> > 
> > > Hi, It looks like head is not able to show results for some reason -  
> > > possibly a javascript error. Can you let me know if there are any errors in  
> > > the javascript console.
> > > 
> > > -B
> > > 
> > > On Thursday, 14 February 2013 14:18:54 UTC+11, Cayman wrote:
> > > 
> > > > Hi, I am new to ES and ES-head. I just downloaded ES 0.20.4. I just  
> > > > installed ES-head, both as a plugin and manual download. I created a new  
> > > > index called twitter with type tweet, and inserted one document: { user :  
> > > > "kimchy", message : "first tweet by me" }. I can search for and return  
> > > > this document using curl.
> > > > 
> > > > [http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/) shows me the index. The Browser  
> > > > tab shows the correct indices (twitter), types(tweet) and Fields(message  
> > > > and user). However, I am unable to get any search results to show up. If I  
> > > > click on user and type in the field kimchy I don't see any results.  
> > > > However, if I type in something other than kimchy, say the letter x, then I  
> > > > immediately see: "Searched 5 of 5 shards, 0 hits, 0.001 seconds"  
> > > > Underneath that I see "\_index \_type \_id \_score" as if it were a table.
> > > > 
> > > > Similarly, if I use the Structured Query+ tab, I enter for must:  
> > > > tweet.user and for term: kimchy. After I press the Search button, I see  
> > > > "Searching..." but no results.
> > > > 
> > > > I have installed ES-head both from plugin and manually, both with the  
> > > > same results. I am using os x lion and I have tried safari, ffox, chrome,  
> > > > all with the same results.
> > > > 
> > > > Thank you.

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![caymanag](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@caymanag](https://discuss.elastic.co/u/caymanag)\
**Post date:** [February 15, 2013, 2:16pm UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/6 "2013-02-15T14:16:06Z")

</div>

When I press the Search button under Structured Query, the console shows  
the following error:

1. Uncaught SyntaxError: Unexpected token u jquery.js:553[http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)
  1. jQuery.extend.parseJSONjquery.js:553[http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)
  2. $.ajax.acx.extend.errorwidgets.js:1485[http://localhost:9200/\_plugin/head/lib/es/widgets.js](http://localhost:9200/_plugin/head/lib/es/widgets.js)
  3. deferred.resolveWithjquery.js:995[http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)
  4. donejquery.js:7130[http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)
  5. callbackjquery.js:7907[http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)

The query I am executing is: must tweet.user term:kimchy

On Friday, February 15, 2013 9:08:44 AM UTC-5, Cayman wrote:

> The response from the server looks completely correct. Under the Browser  
> tab, if I type the letters k,i,m,c,h,y then I get back the single document:  
> {"took":4,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max\_score":1.0,"hits":[{"\_index":"twitter","\_type":"tweet","\_id":"1","\_version":1,"\_score":1.0,  
> "\_source" :  
> {  
> user : "kimchy",  
> message : "first tweet by me"  
> }}]}}
> 
> There are still no search results shown in the browser window
> 
> Anytime I enter an incorrect character, say kimchyx, I get:
> 
> {"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}
> 
> In the browser window I now see the following:  
> Searched 5 of 5 shards. 0 hits. 0.001 seconds  
> \_index  
> \_type  
> \_id  
> ▼  
> \_score
> 
> Similarly, under the Structured Search tab, the Network shows correct  
> results being returned:  
> {"took":1,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max\_score":1.0,"hits":[{"\_index":"twitter","\_type":"tweet","\_id":"1","\_score":1.0,  
> "\_source" :  
> {  
> user : "kimchy",  
> message : "first tweet by me"  
> }}]}}
> 
> However, the UI only shows: Searching...
> 
> I hope this helps. Thank you.
> 
> On Thursday, February 14, 2013 7:15:32 PM UTC-5, mobz wrote:
> 
> > I have attempted to reproduce the problem using a new cluster and a the  
> > data you specify with es 0.20.4 and can not (it works as expected). It  
> > looks from above like there might be a problem with the json that es is  
> > producing? In chrome, can you open the 'network' debugging tab and copy the  
> > request / response to the request to  
> > [http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search) that is causing the error.
> > 
> > On Thursday, 14 February 2013 15:30:39 UTC+11, Cayman wrote:
> > 
> > > In FFox I see the following:
> > > 
> > > 1. when I used the Structured Query I see this error  
> > > [23:18:25.130] POST [http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search) [HTTP/1.1 200  
> > > OK 2ms]  
> > > [23:18:25.079] SyntaxError: JSON.parse: expected property name or '}' @  
> > > [http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js:553](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js:553)  
> > > Here is my line 553:
> > > 
> > > Line 551: // Attempt to parse using the native JSON parser first  
> > > Line 552: if ( window.JSON && window.JSON.parse ) {  
> > > Line 553: return window.JSON.parse( data );  
> > > Line 554: }
> > > 
> > > 1. when I use the Browser tab I press Refresh and I see this  
> > > [23:13:49.455] POST [http://localhost:9200/\_all/\_search](http://localhost:9200/_all/_search) [HTTP/1.1 200 OK  
> > > 2ms]  
> > > [23:13:49.404] ({'XHR Error':"parsererror", message:(new  
> > > SyntaxError("JSON.parse: expected property name or '}'", "  
> > > [http://localhost:9200/\_plugin/head/lib/jsacx/src/jquery.js](http://localhost:9200/_plugin/head/lib/jsacx/src/jquery.js)", 553))})  
> > > There is a hyperlink for core.js:83. If I display this line I see:
> > > 
> > > console.log({ "XHR Error": type, "message": message }); (looks ok to me) Here is the complete function from core.js
> > > 
> > > request: function(params) {  
> > > return $.ajax(acx.extend({  
> > > url: this.config.base\_uri + params.path,  
> > > dataType: "json",  
> > > error: function(xhr, type, message) {  
> > > if("console" in window) {  
> > > console.log({ "XHR Error": type, "message": message });  
> > > }  
> > > }  
> > > }, params));  
> > > },
> > > 
> > > Similarly, if I don't use the plugin, I see the following error (this  
> > > time in Safari) on the Browser tab  
> > > Object  
> > > XHR Error: "parsererror"  
> > > message: Error  
> > > line: 553  
> > > message: "JSON Parse error: Expected '}'"  
> > > sourceURL:  
> > > "file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js"  
> > > stack: "parse@[native  
> > > code]↵parseJSON@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:553↵ajaxConvert@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7549↵done@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7101↵callback@file:///Developer/Devtools/Elasticsearch-head/elasticsearch-head/lib/jsacx/src/jquery.js:7907↵[native  
> > > code]"  
> > > **proto** : Error  
> > > **proto** : Object
> > > 
> > > Thank you
> > > 
> > > On Wednesday, February 13, 2013 11:08:08 PM UTC-5, mobz wrote:
> > > 
> > > > Hi, It looks like head is not able to show results for some reason -  
> > > > possibly a javascript error. Can you let me know if there are any errors in  
> > > > the javascript console.
> > > > 
> > > > -B
> > > > 
> > > > On Thursday, 14 February 2013 14:18:54 UTC+11, Cayman wrote:
> > > > 
> > > > > Hi, I am new to ES and ES-head. I just downloaded ES 0.20.4. I just  
> > > > > installed ES-head, both as a plugin and manual download. I created a new  
> > > > > index called twitter with type tweet, and inserted one document: { user :  
> > > > > "kimchy", message : "first tweet by me" }. I can search for and return  
> > > > > this document using curl.
> > > > > 
> > > > > [http://localhost:9200/\_plugin/head/](http://localhost:9200/_plugin/head/) shows me the index. The Browser  
> > > > > tab shows the correct indices (twitter), types(tweet) and Fields(message  
> > > > > and user). However, I am unable to get any search results to show up. If I  
> > > > > click on user and type in the field kimchy I don't see any results.  
> > > > > However, if I type in something other than kimchy, say the letter x, then I  
> > > > > immediately see: "Searched 5 of 5 shards, 0 hits, 0.001 seconds"  
> > > > > Underneath that I see "\_index \_type \_id \_score" as if it were a table.
> > > > > 
> > > > > Similarly, if I use the Structured Query+ tab, I enter for must:  
> > > > > tweet.user and for term: kimchy. After I press the Search button, I see  
> > > > > "Searching..." but no results.
> > > > > 
> > > > > I have installed ES-head both from plugin and manually, both with the  
> > > > > same results. I am using os x lion and I have tried safari, ffox, chrome,  
> > > > > all with the same results.
> > > > > 
> > > > > Thank you.

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mobz\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mobz_2/32/2473_2.png) [@mobz\_2](https://discuss.elastic.co/u/mobz_2)\
**Post date:** [February 16, 2013, 4:42am UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/7 "2013-02-16T04:42:35Z")

</div>

ok, the problem is that elasticsearch accepts badly formed JSON and stores it in the \_source field without fixing it. When it is returned to the browser Elasticsearch is generating JSON which the (strict) parser in the browser fails on. The solution is deleting the first tweet and creating a new tweet with a strict json doc. eg "user":"me" rather than user:"me"

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mobz\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mobz_2/32/2473_2.png) [@mobz\_2](https://discuss.elastic.co/u/mobz_2)\
**Post date:** [February 16, 2013, 12:34pm UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/8 "2013-02-16T12:34:49Z")

</div>

see here for the  
backstory [invalid json is produced for get and search if original document contains invalid json · Issue #586 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/586)

On Saturday, 16 February 2013 15:42:35 UTC+11, mobz wrote:

> ok, the problem is that elasticsearch accepts badly formed JSON and stores  
> it in the \_source field without fixing it. When it is returned to the  
> browser Elasticsearch is generating JSON which the (strict) parser in the  
> browser fails on. The solution is deleting the first tweet and creating a  
> new tweet with a strict json doc. eg "user":"me" rather than user:"me"

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![caymanag](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@caymanag](https://discuss.elastic.co/u/caymanag)\
**Post date:** [February 18, 2013, 3:56am UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/9 "2013-02-18T03:56:34Z")

</div>

Yes, that was it. I'll have to be careful. Thanks for taking the time to  
help.

On Friday, February 15, 2013 11:42:35 PM UTC-5, mobz wrote:

> ok, the problem is that elasticsearch accepts badly formed JSON and stores  
> it in the \_source field without fixing it. When it is returned to the  
> browser Elasticsearch is generating JSON which the (strict) parser in the  
> browser fails on. The solution is deleting the first tweet and creating a  
> new tweet with a strict json doc. eg "user":"me" rather than user:"me"

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:51am UTC](https://discuss.elastic.co/t/elasticsearch-head-not-working-for-newbie-on-1-doc-index/10737/10 "2017-07-06T02:51:05Z")

</div>


