geolexica / geolexica-server

Generalized backend for Geolexica sites
2 stars 1 forks source link

Generalize search feature #130

Closed skalee closed 4 years ago

skalee commented 4 years ago

This pull request makes the search front-end generic and configurable, so that scripts can be shared between sites. Till now, every site had its own copy of concept-search.js and concept-search-worker.js with some subtle changes. Obviously, it was a source of bugs and maintenance issues, some of which were mentioned in https://github.com/geolexica/geolexica-server/issues/106.

All the required differences, that is availability of particular search controls and supported languages, are now configurable. (Note that the latter shouldn't be needed at all, but it is due to some legacy code, probably written in hurry). Moreover, search index file was given a better name (concept-search-index), and enhanced a bit for the flexibility sake. A sort_order field has been added to the index, which in future may hold various sorting types.

CC @strogonoff, as you're probably interested in changes to this feature and you may have some comments.