nxus / searcher

MIT License
0 stars 0 forks source link

Better support for multiple indexes and config in searchable #20

Open loppear opened 5 years ago

loppear commented 5 years ago

Add mapping/analysis options to searchable, and package our common/reusable analysis definitions as library objects.

Searcher mapping/analysis config is a very verbose addition to .nxusrc that ideally could be moved into code rather than config JSON to be partially shared, packaged, and dynamically defined during application startup.

waterline-elasticsearch uses these index mapping/analysis config at db connection time, and it's probably reasonable to only "dynamically" modify/set these at startup not arbitrarily while running, so this would just involve searcher poking additional config into the application.config.storage structure, as it does today for the default case.

davidkellerman commented 5 years ago

It would be a lot more convenient to be able to configure searcher in the application code, rather than in the .nxusrc JSON. Something akin to WL model definitions. And be able to use JavaScript code and import mechanisms for sharing common definition components.

However, from what's accumulating here and in issue #19, it seems like a major re-think of searcher configuration is in order, based on what we've learned from using it so far.