rufuspollock-okfn / elasticsearch.js

A simple javascript library for working with ElasticSearch
78 stars 18 forks source link

Live recline demo #3

Open rufuspollock opened 11 years ago

rufuspollock commented 11 years ago

Need free hosted ES somewhere, options are:

rufuspollock commented 11 years ago

Suggest using this data: https://github.com/rgrp/rendition-flights (can do nice geo queries). alternatively we can use crime data.

karmi commented 11 years ago

For hosted Elasticsearch, you can get in touch with @nz or @alexbrasetvik...

rufuspollock commented 11 years ago

@karmi I just need something small e.g. <=50k documents (or even <=20k) and it doesn't need backup, replication or anything ...

alexbrasetvik commented 11 years ago

Hey.

Found is happy to help out open source projects.

Can you ping us at contact@found.no (or alex@found.no)?

rufuspollock commented 11 years ago

That's awesome. @alexbrasetvik what info do you need? (I also note we love pro-bono ES support for the open-source Annotator project - http://annotateit.org/ + http://okfnlabs.org/annotator !)

nz commented 11 years ago

Likewise I am always happy to help host cool open source projects. info@bonsai.io. Where is your app hosted?

—Nick

On Jul 1, 2013, at 7:03, Rufus Pollock notifications@github.com wrote:

That's awesome. @alexbrasetvik what info do you need? (I also note we love pro-bono ES support for the open-source Annotator project - http://annotateit.org/ + http://okfnlabs.org/annotator !)

— Reply to this email directly or view it on GitHub.

rufuspollock commented 11 years ago

@nz The app could be hosted anywhere (and likely on gh-pages as JS only). What I do need is a free ES instance to store data for the appy. It's just demonstration purposes so pretty small (<= 50k docs or even smaller and no backup etc needed)

I've copied above into description of the ticket the options we'd looked at prior to this thread (as part of #2)

acouch commented 9 years ago

@rgrp I am interested in a live demo of this capability as well to add to our implementations of recline and our public demos: http://nucivic.github.io/nvd3_visualization_app/

I created a free elastic search endpoint using the familiar "us_foreclosures_jan_2012_by_state.csv" file: https://site:8b7b79ad1bffe061b85f096a7b0af349@dwalin-us-east-1.searchly.com/us_foreclosures_jan_2012_by_state

I could make sure to maintain this if others want to use it for demo purposes.

rufuspollock commented 9 years ago

@acouch this would be awesome - this has been blocked for a while on getting everything sorted. Thanks for hosting this and the next step would be to a /demo/ page for this repo and migrate over the old recline elasticsearch demo here and get it working with that data (we ideally wanting something that is fairly rich including geo pooint data which i think you have!)

acouch commented 9 years ago

Great.

next step would be to a /demo/ page for this repo and migrate over the old recline elasticsearch demo here and get it working with that data

I can try and help with that too. If there is a better dataset happy to post another as well.

That host requires the username / pass which is why I created #17 so that I could pass the user/pass to makeRequest() as the HTTP Basic Auth credentials need to be passed to the header.

The only other thing I came across is that the endpoint I created has a few more layers to get to the mapping get the proper fields: https://github.com/okfn/elasticsearch.js/blob/gh-pages/elasticsearch.js#L298

Locally I had to make the following change:

-      var fieldData = _.map(schema[key].properties, function(dict, fieldName) {
+      var fieldData = _.map(schema[key].mappings.TYPE.properties, function(dict, fieldName) {

where TYPE is the ES type which is data in the endpoint I created https://dwalin-us-east-1.searchly.com/us_foreclosures_jan_2012_by_state/_mapping

screen shot 2015-06-29 at 9 57 49 am

I didn't create a PR b/c I'm not sure why that is occurring. Will try and do some more research on my end. If you have any insight on that let me know and we can resolve.

rufuspollock commented 9 years ago

This may be a fix for more recent ES versions. Do you want to make the patch in master or check when ES made this change.

acouch commented 9 years ago

@rgrp I'll do a little more research and make a PR.