GithubHelp home page GithubHelp logo

angular-elasticsearch-demo's People

Contributors

adambard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-elasticsearch-demo's Issues

Getting errors on search

Hello Adam,
I am going through your tutorial about elasticsearch, actually I am new to this and ust atarted learning it, I found this tutorial really nice end to end but I am getting some errors.
I am done up to building search engine and now I stucked at UI part, I opened the page in the browser but not getting any results.
Here is the error :
error

XMLHttpRequest cannot load ....

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

factory and controller

Could you also please explain the meaning of:
function($q, elasticsearch, $location)

you pass to the factory?

and:
function(recipes, $scope, $location)
you pass to the controller?

I got the sense you pass a value from the controller to the factory, is it that?
(from input search field, to factory, which produces the obj of results)
But I didn't understand how is done exactly.

Also,
what's the need of:
['$locationProvider', function($locationProvider){
$locationProvider.html5Mode(true);
}]

in the module?
I read your blog but didn't understand these passages.

Thank you!

'require' is undefined

Dear Adam,
Thank you for your tutorial. Unfortunately, I receive the the following error when starting the app:
"require" is undefined
2018-02-19_17h18_03
I'd appreciate your help!

Duplicate values issue

Constantly getting this error:

Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: ingredient in recipe.ingredients, Duplicate key: string:, Duplicate value: ""

No results - query not returning anything

Hi Adam. I like this demo; thanks for sharing! I got it to work some time ago and am revisiting it. This time, I get 'no results' every time. My elasticsearch is running and when I do a query using head or curl, I get results. How do I troubleshoot? I think the query is not getting to my elasticsearch because I don't see anything in the server stdout in the terminal where es is running. I searched my log for lasagna, and nothing. Please help. Thank you!

Elasticsearch version 1.4.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.