adambard / adambard/angular-elasticsearch-demo

XMLHttpRequest cannot load ....

Ouverte
#1 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
64
Forks
35
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hi Adam!

thank you for your tutorial !

So I'd like to learn angular: I downloaded the db of recipes, ES, and created an index (following your tutorial).

i run the site:
http://localhost/~gg4u/angular-elasticsearch-demo-master/?q=rendang
but got errors (see below).

What does it mean? Should I enable CORS?
Is it a problem with Angular or ES? How to fix it?

http://localhost:9200/~gg4u/angular-elasticsearch-demo-master/?q=rendang
return
{"error":"IndexMissingException[[~gg4u] missing]","status":404}

http://localhost:9200/recipes/recipe/_search
works

In console, for index.html
XMLHttpRequest cannot load http://localhost:9200/recipes/recipe/_search. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. localhost/:1
ERROR: 2014-11-15T21:30:08Z
Error: Request error, retrying -- Connection Failure
at Log.error (http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/elasticsearch/elasticsearch.angular.js:31083:60)
at checkRespForFailure (http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/elasticsearch/elasticsearch.angular.js:31782:18)
at http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/elasticsearch/elasticsearch.angular.js:30527:7
at wrappedErrback (http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/angular/angular.js:11582:78)
at wrappedErrback (http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/angular/angular.js:11582:78)
at wrappedErrback (http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/angular/angular.js:11582:78)
at http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/angular/angular.js:11715:76
at Scope.$eval (http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/angular/angular.js:12702:28)
at Scope.$digest (http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/angular/angular.js:12514:31)
at Scope.$apply (http://localhost/~gg4u/angular-elasticsearch-demo-master/bower_components/angular/angular.js:12806:24)

elasticsearch.angular.js:31397Console.write elasticsearch.angular.js:31397(anonymous function) elasticsearch.angular.js:31411bound elasticsearch.angular.js:10847EventEmitter.emit elasticsearch.angular.js:622Log.error elasticsearch.angular.js:31083checkRespForFailure elasticsearch.angular.js:31782(anonymous function) elasticsearch.angular.js:30527wrappedErrback angular.js:11582wrappedErrback angular.js:11582wrappedErrback angular.js:11582(anonymous function) angular.js:11715Scope.$eval angular.js:12702Scope.$digest angular.js:12514Scope.$apply angular.js:12806done angular.js:8379completeRequest angular.js:8593xhr.onreadystatechange angular.js:8532
XMLHttpRequest cannot load http://localhost:9200/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. localhost/:1
WARNING: 2014-11-15T21:30:08Z
Unable to revive connection: http://localhost:9200/

elasticsearch.angular.js:31397
WARNING: 2014-11-15T21:30:08Z
No living connections

elasticsearch.angular.js:31397

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.