# "View in Sense" not loading sample json

**URL:** <https://discuss.elastic.co/t/view-in-sense-not-loading-sample-json/22765>\
**Category:** Elasticsearch\
**Created:** [March 19, 2015, 4:28pm UTC](https://discuss.elastic.co/t/view-in-sense-not-loading-sample-json/22765 "2015-03-19T16:28:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zelfapp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zelfapp/32/108888_2.png) [@Zelfapp](https://discuss.elastic.co/u/Zelfapp)\
**Post date:** [March 19, 2015, 4:28pm UTC](https://discuss.elastic.co/t/view-in-sense-not-loading-sample-json/22765/1 "2015-03-19T16:28:21Z")

</div>

Hello,

I'm going through the definitive guide for elastic search learning. I've  
got Marvel up and running on my local windows. I'm able to run commands  
against elastic search, etc. In the definitive guide there are "View in  
Sense" links.

E.g.  
[http://www.elastic.co/guide/en/elasticsearch/guide/master/sense\_widget.html?snippets/010\_Intro/10\_Info.json](http://www.elastic.co/guide/en/elasticsearch/guide/master/sense_widget.html?snippets/010_Intro/10_Info.json),  
which in Sense redirects to:  
[http://localhost:9200/\_plugin/marvel/sense/index.html?load\_from=http://www.elastic.co/guide/en/elasticsearch/guide/master/snippets/010\_Intro/10\_Info.json](http://localhost:9200/_plugin/marvel/sense/index.html?load_from=http://www.elastic.co/guide/en/elasticsearch/guide/master/snippets/010_Intro/10_Info.json).

Which should load:

# Check that Elasticsearch is running

GET /

However, it always loads the default json and never anything else:

GET \_search  
{  
"query": { "match\_all": {} }  
}

Not a big deal, I can copy/paste the example json, but anybody experienced this?

I've enabled cors settings in elasticsearch.yml.

Thanks,  
Nate

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ba409e43-435c-4c55-ad82-5914242924fa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ba409e43-435c-4c55-ad82-5914242924fa%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Zelfapp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zelfapp/32/108888_2.png) [@Zelfapp](https://discuss.elastic.co/u/Zelfapp)\
**Post date:** [March 19, 2015, 4:43pm UTC](https://discuss.elastic.co/t/view-in-sense-not-loading-sample-json/22765/2 "2015-03-19T16:43:49Z")

</div>

I've created a Youtube video demo'ing the issue I'm seeing. Kind of  
annoying I can't figure this out. I'm sure the answer is stupid simple, but  
I'm not finding and I have searched, which is ironic.

[![]( " - YouTube") ](https://www.youtube.com/watch?v=4Ksb0t_9Ym0)

On Thursday, March 19, 2015 at 9:28:21 AM UTC-7, Zelfapp wrote:

> Hello,
> 
> I'm going through the definitive guide for Elasticsearch learning. I've  
> got Marvel up and running on my local windows. I'm able to run commands  
> against Elasticsearch, etc. In the definitive guide there are "View in  
> Sense" links.
> 
> E.g.  
> [http://www.elastic.co/guide/en/elasticsearch/guide/master/sense\_widget.html?snippets/010\_Intro/10\_Info.json](http://www.elastic.co/guide/en/elasticsearch/guide/master/sense_widget.html?snippets/010_Intro/10_Info.json),  
> which in Sense redirects to:  
> [http://localhost:9200/\_plugin/marvel/sense/index.html?load\_from=http://www.elastic.co/guide/en/elasticsearch/guide/master/snippets/010\_Intro/10\_Info.json](http://localhost:9200/_plugin/marvel/sense/index.html?load_from=http://www.elastic.co/guide/en/elasticsearch/guide/master/snippets/010_Intro/10_Info.json)  
> .
> 
> Which should load:
> 
> # Check that Elasticsearch is running
> 
> GET /
> 
> However, it always loads the default json and never anything else:
> 
> GET \_search  
> {  
> "query": { "match\_all": {} }  
> }
> 
> Not a big deal, I can copy/paste the example json, but anybody experienced this?
> 
> I've enabled cors settings in elasticsearch.yml.
> 
> Thanks,  
> Nate

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 19, 2015, 6:16pm UTC](https://discuss.elastic.co/t/view-in-sense-not-loading-sample-json/22765/3 "2015-03-19T18:16:56Z")

</div>

You need the server in there, I don't know why it doesn't add that  
automatically but that's why you are getting the CORS error, it is a  
misleading response.

It'd be worth raising this as an issue on Github against the Elasticsearch  
project 🙂

On 19 March 2015 at 09:43, Zelfapp [nate@usamm.com](mailto:nate@usamm.com) wrote:

> I've created a Youtube video demo'ing the issue I'm seeing. Kind of  
> annoying I can't figure this out. I'm sure the answer is stupid simple, but  
> I'm not finding and I have searched, which is ironic.
> 
> [https://youtu.be/4Ksb0t\_9Ym0](https://youtu.be/4Ksb0t_9Ym0)
> 
> On Thursday, March 19, 2015 at 9:28:21 AM UTC-7, Zelfapp wrote:
> 
> > Hello,
> > 
> > I'm going through the definitive guide for Elasticsearch learning. I've  
> > got Marvel up and running on my local windows. I'm able to run commands  
> > against Elasticsearch, etc. In the definitive guide there are "View in  
> > Sense" links.
> > 
> > E.g. [Elasticsearch: The Definitive Guide [master] | Elastic](http://www.elastic.co/guide/en/elasticsearch/guide/master/)  
> > sense\_widget.html?snippets/010\_Intro/10\_Info.json, which in Sense  
> > redirects to: [http://localhost:9200/\_plugin/marvel/sense/index.html?load\_](http://localhost:9200/_plugin/marvel/sense/index.html?load_)  
> > from=[Elasticsearch - The Definitive Guide | Elastic](http://www.elastic.co/guide/en/elasticsearch/guide/)  
> > master/snippets/010\_Intro/10\_Info.json.
> > 
> > Which should load:
> > 
> > # Check that Elasticsearch is running
> > 
> > GET /
> > 
> > However, it always loads the default json and never anything else:
> > 
> > GET \_search  
> > {  
> > "query": { "match\_all": {} }  
> > }
> > 
> > Not a big deal, I can copy/paste the example json, but anybody experienced this?
> > 
> > I've enabled cors settings in elasticsearch.yml.
> > 
> > Thanks,  
> > Nate
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-JhCn4zZOQoCDV%3DW\_%3DW10n6sbR9-w\_UQLJWV0CGfm9hA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-JhCn4zZOQoCDV%3DW_%3DW10n6sbR9-w_UQLJWV0CGfm9hA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Zelfapp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zelfapp/32/108888_2.png) [@Zelfapp](https://discuss.elastic.co/u/Zelfapp)\
**Post date:** [March 19, 2015, 6:23pm UTC](https://discuss.elastic.co/t/view-in-sense-not-loading-sample-json/22765/4 "2015-03-19T18:23:58Z")

</div>

Hello Mark,

You can see I already raised it on github and received a response. This  
issue will be temporary and is related to Elastic changing their domain and  
not updating the CORS header in the definitive guide.

> <https://github.com/elastic/elasticsearch-definitive-guide/issues/330>
>
> For new users the documentation found at http://www.elastic.co/guide/en/elastics…earch/guide/master/\_installing\_elasticsearch.html is incomplete in regards to what to expect when clicking on "View in Sense" links in the definitive guide.
> 
> When I click "View in Sense" in Firefox or Chrome (Windows) I'm expecting to see the sample code and be able to run it against sample data to see the results documented in the guide. 
> 
> I created a youtube video (https://www.youtube.com/watch?v=4Ksb0t\_9Ym0) to demonstrate the issue I'm finding when trying to click "View in Sense". When I click on "View in Sense" anywhere in the definitive guide, no json is being loaded, and the server field gets wiped out. Super confusing. When I click on the green run icon I get a cors settings error, presumably because there is no host in the server field now that I've clicked on "View in Sense", which wiped out my localhost server.
> 
> Is the server field in Sense supposed to be populated to an elasticsearch demo data host when I click on "View in Sense"? Was I supposed to download sample data referenced in the guide and add it to my localhost? Or is the data completely hypothetical and I can't run the sample code? This is fine, but for brand new users it should be spelled out in the "View in Sense" explanation.
> 
> On http://www.elastic.co/guide/en/elasticsearch/guide/master/\_installing\_elasticsearch.html it states, "Many of the code examples in the online version of this book include a View in Sense link. When clicked, it will open up a working example of the code in the Sense console. You do not have to install Marvel, but it will make this book much more interactive by allowing you to experiment with the code samples on your local Elasticsearch cluster." So it appears the sample data should be local?
> 
> My guess would be my issue is most likely due to running on crappy windows or I missed a critical setup step for either Sense, Marvel, elasticsearch.yml, or the definitive guide. Would love to hear why this isn't working and what step, if any, I skipped. For brand new learners to ES this kind of stuff should be spelled out a litter more in the Getting Started section in my opinion. Thank you.

Thanks for the reply.

On Thursday, March 19, 2015 at 11:17:42 AM UTC-7, Mark Walkom wrote:

> You need the server in there, I don't know why it doesn't add that  
> automatically but that's why you are getting the CORS error, it is a  
> misleading response.
> 
> It'd be worth raising this as an issue on Github against the Elasticsearch  
> project 🙂
> 
> On 19 March 2015 at 09:43, Zelfapp \<[na...@usamm.com](mailto:na...@usamm.com) \<javascript:\>\> wrote:
> 
> > I've created a Youtube video demo'ing the issue I'm seeing. Kind of  
> > annoying I can't figure this out. I'm sure the answer is stupid simple, but  
> > I'm not finding and I have searched, which is ironic.
> > 
> > [https://youtu.be/4Ksb0t\_9Ym0](https://youtu.be/4Ksb0t_9Ym0)
> > 
> > On Thursday, March 19, 2015 at 9:28:21 AM UTC-7, Zelfapp wrote:
> > 
> > > Hello,
> > > 
> > > I'm going through the definitive guide for Elasticsearch learning. I've  
> > > got Marvel up and running on my local windows. I'm able to run commands  
> > > against Elasticsearch, etc. In the definitive guide there are "View in  
> > > Sense" links.
> > > 
> > > E.g. [Elasticsearch: The Definitive Guide [master] | Elastic](http://www.elastic.co/guide/en/elasticsearch/guide/master/)  
> > > sense\_widget.html?snippets/010\_Intro/10\_Info.json, which in Sense  
> > > redirects to: [http://localhost:9200/\_plugin/](http://localhost:9200/_plugin/)  
> > > marvel/sense/index.html?load\_from=[http://www.elastic.co/](http://www.elastic.co/)  
> > > guide/en/elasticsearch/guide/master/snippets/010\_Intro/10\_Info.json.
> > > 
> > > Which should load:
> > > 
> > > # Check that Elasticsearch is running
> > > 
> > > GET /
> > > 
> > > However, it always loads the default json and never anything else:
> > > 
> > > GET \_search  
> > > {  
> > > "query": { "match\_all": {} }  
> > > }
> > > 
> > > Not a big deal, I can copy/paste the example json, but anybody experienced this?
> > > 
> > > I've enabled cors settings in elasticsearch.yml.
> > > 
> > > Thanks,  
> > > Nate
> > > 
> > > --  
> > > 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](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4c793a28-9b90-4dce-acbb-96a93f12ea09%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/644efee4-98c8-4acf-85d9-a66c94da8da8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/644efee4-98c8-4acf-85d9-a66c94da8da8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:25am UTC](https://discuss.elastic.co/t/view-in-sense-not-loading-sample-json/22765/5 "2017-07-06T00:25:33Z")

</div>


