Web page unable to render - nfl-elastic-aggregations blog (D3-ES)

Attempting to work my way through the article at

Although the blog article was written for ES 1.0, I am attempting to run on
current stable ES 1.4.
Skimming the commands, I don't see anything I think should be an issue
between the two ES versions, and I haven't located anything in the code
that specifies an ES version.

Main attempt:
Install ES 1.4 (single node in the cluster for this exercise).
Successfully created the ES index and mappings, and loaded data into ES
using the described commands

curl -XPOST localhost:9200/nfl?pretty
curl -XPUT localhost:9200/nfl/2013/_mapping?pretty -d @nfl_mapping.json
curl -XPOST localhost:9200/nfl/2013/_bulk?pretty --data-binary
@nfl_2013.json

Besides visually seeing results, I can also run the first two curl commands
with XGET instead of XPOST and XPUT with favorable results.

First anomaly I ran into is that the projects links point to a package
"elasticsearch.js.zip" which contains a number of angular and other scripts
rather than a single "elasticsearch.js" file. So, my first attempt was to
unzip the package and place it in a directory "elasticsearch.js" but that
continued to cause errors.

Secondary attempt:
Unable to determine correct deployment of elasticsearch.js (there are a
number of ad hoc possibiliites) I instead downloaded the project from
github (https://github.com/stormpython/nfl-elastic-aggregations), with the
assumption that the files and website structure should be pre-configured to
work.

The cloned github project indeed included an elasticsearch.js file instead
of an elasticsearch.js directory containing individual scripts.
However, when I deployed the files and index.html, the website page
continues to display as empty with numerous errors relating to cross domain
connections and search, the critical error follows

mutating the [[Prototype]] of an object will cause your code to run very
slowly; instead create the object with the correct initial [[Prototype]]
value using Object.create d3.v3.js:479
Cross-Origin Request Blocked: The Same Origin Policy disallows reading
the remote resource at http://localhost:9200/nfl/_search?size=5. This can
be fixed by moving the resource to the same domain or enabling CORS. _search
"ERROR: 2014-11-18T22:39:20Z

[26]</Log.prototype.error@http://localhost/scripts/elasticsearch.js:19151:56
checkRespForFailure@http://localhost/scripts/elasticsearch.js:19817:9

[23]</XhrConnector.prototype.request/xhr.onreadystatechange@http://localhost/scripts/elasticsearch.js:18655:7

" elasticsearch.js:19450

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the
remote resource at http://localhost:9200/. This can be fixed by moving the
resource to the same domain or enabling CORS. localhost:9200
"WARNING: 2014-11-18T22:39:20Z
Unable to revive connection: http://localhost:9200/

" elasticsearch.js:19450
"WARNING: 2014-11-18T22:39:20Z
No living connections

" elasticsearch.js:19450
"ERROR: 2014-11-18T22:39:20Z

[26]</Log.prototype.error@http://localhost/scripts/elasticsearch.js:19151:56
checkRespForFailure@http://localhost/scripts/elasticsearch.js:19817:9

[23]</XhrConnector.prototype.request/xhr.onreadystatechange@http://localhost/scripts/elasticsearch.js:18655:7

" elasticsearch.js:19450

"WARNING: 2014-11-18T22:39:20Z
Unable to revive connection: http://localhost:9200/

" elasticsearch.js:19450
"WARNING: 2014-11-18T22:39:20Z
No living connections

" elasticsearch.js:19450

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Regarding the CORS errors, see
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html#_settings_2

On 19 November 2014 09:45, Tony Su tonysu999@gmail.com wrote:

Attempting to work my way through the article at

http://www.elasticsearch.org/blog/data-visualization-elasticsearch-aggregations/

Although the blog article was written for ES 1.0, I am attempting to run
on current stable ES 1.4.
Skimming the commands, I don't see anything I think should be an issue
between the two ES versions, and I haven't located anything in the code
that specifies an ES version.

Main attempt:
Install ES 1.4 (single node in the cluster for this exercise).
Successfully created the ES index and mappings, and loaded data into ES
using the described commands

curl -XPOST localhost:9200/nfl?pretty
curl -XPUT localhost:9200/nfl/2013/_mapping?pretty -d @nfl_mapping.json
curl -XPOST localhost:9200/nfl/2013/_bulk?pretty --data-binary
@nfl_2013.json

Besides visually seeing results, I can also run the first two curl
commands with XGET instead of XPOST and XPUT with favorable results.

First anomaly I ran into is that the projects links point to a package
"elasticsearch.js.zip" which contains a number of angular and other scripts
rather than a single "elasticsearch.js" file. So, my first attempt was to
unzip the package and place it in a directory "elasticsearch.js" but that
continued to cause errors.

Secondary attempt:
Unable to determine correct deployment of elasticsearch.js (there are a
number of ad hoc possibiliites) I instead downloaded the project from
github (https://github.com/stormpython/nfl-elastic-aggregations), with
the assumption that the files and website structure should be
pre-configured to work.

The cloned github project indeed included an elasticsearch.js file instead
of an elasticsearch.js directory containing individual scripts.
However, when I deployed the files and index.html, the website page
continues to display as empty with numerous errors relating to cross domain
connections and search, the critical error follows

mutating the [[Prototype]] of an object will cause your code to run very
slowly; instead create the object with the correct initial [[Prototype]]
value using Object.create d3.v3.js:479
Cross-Origin Request Blocked: The Same Origin Policy disallows reading
the remote resource at http://localhost:9200/nfl/_search?size=5. This can
be fixed by moving the resource to the same domain or enabling CORS. _search
"ERROR: 2014-11-18T22:39:20Z
[26]</Log.prototype.error@
http://localhost/scripts/elasticsearch.js:19151:56
checkRespForFailure@http://localhost/scripts/elasticsearch.js:19817:9
[23]</XhrConnector.prototype.request/xhr.onreadystatechange@
http://localhost/scripts/elasticsearch.js:18655:7

" elasticsearch.js:19450

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the
remote resource at http://localhost:9200/. This can be fixed by moving
the resource to the same domain or enabling CORS. localhost:9200
"WARNING: 2014-11-18T22:39:20Z
Unable to revive connection: http://localhost:9200/

" elasticsearch.js:19450
"WARNING: 2014-11-18T22:39:20Z
No living connections

" elasticsearch.js:19450
"ERROR: 2014-11-18T22:39:20Z
[26]</Log.prototype.error@
http://localhost/scripts/elasticsearch.js:19151:56
checkRespForFailure@http://localhost/scripts/elasticsearch.js:19817:9
[23]</XhrConnector.prototype.request/xhr.onreadystatechange@
http://localhost/scripts/elasticsearch.js:18655:7

" elasticsearch.js:19450

"WARNING: 2014-11-18T22:39:20Z
Unable to revive connection: http://localhost:9200/

" elasticsearch.js:19450
"WARNING: 2014-11-18T22:39:20Z
No living connections

" elasticsearch.js:19450

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAF3ZnZnxJ6YSchxV2FPmNZjT-FGXagHpaGiTtypw0YnhYbFixQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thx.
Will give those settings a go.

Tony

On Tuesday, November 18, 2014 3:08:51 PM UTC-8, Mark Walkom wrote:

Regarding the CORS errors, see
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html#_settings_2

On 19 November 2014 09:45, Tony Su <tony...@gmail.com <javascript:>>
wrote:

Attempting to work my way through the article at

http://www.elasticsearch.org/blog/data-visualization-elasticsearch-aggregations/

Although the blog article was written for ES 1.0, I am attempting to run
on current stable ES 1.4.
Skimming the commands, I don't see anything I think should be an issue
between the two ES versions, and I haven't located anything in the code
that specifies an ES version.

Main attempt:
Install ES 1.4 (single node in the cluster for this exercise).
Successfully created the ES index and mappings, and loaded data into ES
using the described commands

curl -XPOST localhost:9200/nfl?pretty
curl -XPUT localhost:9200/nfl/2013/_mapping?pretty -d @nfl_mapping.json
curl -XPOST localhost:9200/nfl/2013/_bulk?pretty --data-binary
@nfl_2013.json

Besides visually seeing results, I can also run the first two curl
commands with XGET instead of XPOST and XPUT with favorable results.

First anomaly I ran into is that the projects links point to a package
"elasticsearch.js.zip" which contains a number of angular and other scripts
rather than a single "elasticsearch.js" file. So, my first attempt was to
unzip the package and place it in a directory "elasticsearch.js" but that
continued to cause errors.

Secondary attempt:
Unable to determine correct deployment of elasticsearch.js (there are a
number of ad hoc possibiliites) I instead downloaded the project from
github (https://github.com/stormpython/nfl-elastic-aggregations), with
the assumption that the files and website structure should be
pre-configured to work.

The cloned github project indeed included an elasticsearch.js file
instead of an elasticsearch.js directory containing individual scripts.
However, when I deployed the files and index.html, the website page
continues to display as empty with numerous errors relating to cross domain
connections and search, the critical error follows

mutating the [[Prototype]] of an object will cause your code to run very
slowly; instead create the object with the correct initial [[Prototype]]
value using Object.create d3.v3.js:479
Cross-Origin Request Blocked: The Same Origin Policy disallows reading
the remote resource at http://localhost:9200/nfl/_search?size=5. This
can be fixed by moving the resource to the same domain or enabling CORS.
_search
"ERROR: 2014-11-18T22:39:20Z
[26]</Log.prototype.error@
http://localhost/scripts/elasticsearch.js:19151:56
checkRespForFailure@http://localhost/scripts/elasticsearch.js:19817:9
[23]</XhrConnector.prototype.request/xhr.onreadystatechange@
http://localhost/scripts/elasticsearch.js:18655:7

" elasticsearch.js:19450

Cross-Origin Request Blocked: The Same Origin Policy disallows reading
the remote resource at http://localhost:9200/. This can be fixed by
moving the resource to the same domain or enabling CORS. localhost:9200
"WARNING: 2014-11-18T22:39:20Z
Unable to revive connection: http://localhost:9200/

" elasticsearch.js:19450
"WARNING: 2014-11-18T22:39:20Z
No living connections

" elasticsearch.js:19450
"ERROR: 2014-11-18T22:39:20Z
[26]</Log.prototype.error@
http://localhost/scripts/elasticsearch.js:19151:56
checkRespForFailure@http://localhost/scripts/elasticsearch.js:19817:9
[23]</XhrConnector.prototype.request/xhr.onreadystatechange@
http://localhost/scripts/elasticsearch.js:18655:7

" elasticsearch.js:19450

"WARNING: 2014-11-18T22:39:20Z
Unable to revive connection: http://localhost:9200/

" elasticsearch.js:19450
"WARNING: 2014-11-18T22:39:20Z
No living connections

" elasticsearch.js:19450

--
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:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/07d6d511-4e26-453b-9998-044aeba12c61%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a531197b-c543-403a-9684-e54bb7ff13bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.