fergiemcdowall / norch-angular-app

A basic Norch-powered angular app. Use as an example or starting point.
MIT License
2 stars 0 forks source link

norch-angular-app without response #4

Closed eklem closed 9 years ago

eklem commented 9 years ago

Is norch-angular-app tested against latest search-index @fergiemcdowall?

I've re-installed norch, started it and indexed the world-bank-projects-norchified.json dataset. I can search norch and get nice JSON back when typing http://localhost:3030/search?q=papua

I've then clond norch-angular-app, typed npm install inside the cloned folder. When I type npm start I get an empty search box on URL http://localhost:8000/app/index.html#/search, but when I type papua the app is without response (nothing happens). The console window where I run norch is logging the following:

GET /bootstrap-dist/js/bootstrap.min.js 304 - - 1.116 ms
GET /search 200 35 - 0.784 ms
GET /matcher?beginsWith=p 200 2 - 0.598 ms
GET /matcher?beginsWith=pa 200 2 - 0.592 ms
{"name":"norch","hostname":"Macintosh-2.local","pid":16474,"level":30,"msg":"{\"query\":{\"*\":[\"pap\"]},\"facets\":{\"mjtheme\":{},\"totalamt\":{\"ranges\":[[\"000000000000001\",\"000000100000000\"],[\"000000100000001\",\"000000250000000\"],[\"000000250000001\",\"000000500000000\"],[\"000000500000001\",\"100000000000000\"]]}},\"facetLength\":10,\"maxFacetLimit\":100,\"offset\":0,\"pageSize\":100}","time":"2015-06-14T10:58:31.030Z","v":0}
GET /search?JSONq=%7B%22query%22:%7B%22*%22:%5B%22pap%22%5D%7D,%22facets%22:%7B%22mjtheme%22:%7B%7D,%22totalamt%22:%7B%22ranges%22:%5B%5B%22000000000000001%22,%22000000100000000%22%5D,%5B%22000000100000001%22,%22000000250000000%22%5D,%5B%22000000250000001%22,%22000000500000000%22%5D,%5B%22000000500000001%22,%22100000000000000%22%5D%5D%7D%7D%7D 200 11 - 1.769 ms
GET /matcher?beginsWith=pap 200 17 - 6.764 ms
{"name":"norch","hostname":"Macintosh-2.local","pid":16474,"level":30,"msg":"{\"query\":{\"*\":[\"papu\"]},\"facets\":{\"mjtheme\":{},\"totalamt\":{\"ranges\":[[\"000000000000001\",\"000000100000000\"],[\"000000100000001\",\"000000250000000\"],[\"000000250000001\",\"000000500000000\"],[\"000000500000001\",\"100000000000000\"]]}},\"facetLength\":10,\"maxFacetLimit\":100,\"offset\":0,\"pageSize\":100}","time":"2015-06-14T10:58:31.196Z","v":0}
GET /search?JSONq=%7B%22query%22:%7B%22*%22:%5B%22papu%22%5D%7D,%22facets%22:%7B%22mjtheme%22:%7B%7D,%22totalamt%22:%7B%22ranges%22:%5B%5B%22000000000000001%22,%22000000100000000%22%5D,%5B%22000000100000001%22,%22000000250000000%22%5D,%5B%22000000250000001%22,%22000000500000000%22%5D,%5B%22000000500000001%22,%22100000000000000%22%5D%5D%7D%7D%7D 200 11 - 1.011 ms
GET /matcher?beginsWith=papu 200 9 - 2.546 ms
{"name":"norch","hostname":"Macintosh-2.local","pid":16474,"level":30,"msg":"{\"query\":{\"*\":[\"papua\"]},\"facets\":{\"mjtheme\":{},\"totalamt\":{\"ranges\":[[\"000000000000001\",\"000000100000000\"],[\"000000100000001\",\"000000250000000\"],[\"000000250000001\",\"000000500000000\"],[\"000000500000001\",\"100000000000000\"]]}},\"facetLength\":10,\"maxFacetLimit\":100,\"offset\":0,\"pageSize\":100}","time":"2015-06-14T10:58:31.317Z","v":0}
GET /search?JSONq=%7B%22query%22:%7B%22*%22:%5B%22papua%22%5D%7D,%22facets%22:%7B%22mjtheme%22:%7B%7D,%22totalamt%22:%7B%22ranges%22:%5B%5B%22000000000000001%22,%22000000100000000%22%5D,%5B%22000000100000001%22,%22000000250000000%22%5D,%5B%22000000250000001%22,%22000000500000000%22%5D,%5B%22000000500000001%22,%22100000000000000%22%5D%5D%7D%7D%7D 200 8474 - 6.073 ms
GET /matcher?beginsWith=papua 200 9 - 8.151 ms

... and the console window for the norch-angular-app says:

[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/index.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/bower_components/bootstrap/dist/css/bootstrap.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/css/app.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/css/animations.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/bower_components/jquery/dist/jquery.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/bower_components/angular/angular.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/bower_components/angular-animate/angular-animate.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/bower_components/angular-route/angular-route.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/bower_components/angular-resource/angular-resource.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/js/app.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/js/animations.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/js/controllers.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/js/filters.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/js/services.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
[Sun, 14 Jun 2015 10:58:16 GMT] "GET /app/partials/search-list.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
fergiemcdowall commented 9 years ago

Hmm- are the responses sending anything back? Inspect them in the "network" tab of developer tools and double check that they are producing results

eklem commented 9 years ago

not getting anything back in the norch-angular-app. Development tool says "SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data". Same with all the other matcher and search GET's. skjermbilde 2015-06-14 kl 14 09 23

eklem commented 9 years ago

But shnould I clone norch instead of installing from NPM?

eklem commented 9 years ago

Ok, that wasn't it. Cloned norch and did npm install, same error.

fergiemcdowall commented 9 years ago

Hmmm weird, will investigate...

eklem commented 9 years ago

Do I need to clone search-index as well, instead of npm install inside cloned norch-folder?

fergiemcdowall commented 9 years ago

you need to npm install a norch, and run it

Then, in another directory, clone the norch-angular-app, cd, and index the test data before running "npm start"

eklem commented 9 years ago

Yes, installed norch, got it running, cloned norch-angular-app, indexed, did npm install and ran it.

fergiemcdowall commented 9 years ago

Oh! Its probably the Access-Control-Allow-Origin problem

Start Norch like so: ./node_modules/norch/bin/norch -c http://localhost:8000

Does that work?

eklem commented 9 years ago

Works like a charm!