koopjs / koop-escache

ElasticSearch cache for Koop (experimental).
Other
2 stars 1 forks source link

Support non-spatial where clauses #6

Open dmfenton opened 9 years ago

dmfenton commented 9 years ago

This is gonna be tough, but totally worth it.

Needs:

  1. Allow providers to pass in mapping
  2. set up default mappings
  3. Change indexing to hold analyzed and unanalyzed
  4. Parse where clauses and generate elasticsearch json

Some options for generating ES json:

  1. Roll our own
  2. Contribute to and install https://github.com/NLPchina/elasticsearch-sql
  3. Install the plugin above but only use the explain feature to generate SQL and then add to it.
chelm commented 9 years ago

@dmfenton by mappings you mean like a schema right? So a provider would pass in the fields that could be searched?

dmfenton commented 9 years ago

Yep and what type they are.

chelm commented 9 years ago

Can you show me an example of using a single index with different fields mapped? or does this now mean we'd have a different index for every dataset?

dmfenton commented 9 years ago

we probably should keep everything it it's own index you can search across all indexes like so: http://localhost:9200/*/_search

chelm commented 9 years ago

this will be tricky. We'll need to create a schema, but providers currently dont pass schema info down to the cache on creation. Koop caches assume uniform json. Will need to think through that and avoid doing something in a provider that is custom to ES.