onegov-cloud
onegov-cloud copied to clipboard
Feature/ogc 508 replace elastic search by postgres text search
INITIAL FEEDBACK TO TEXT SEARCH IN POSTGRES - WORK IN PROGRESS
Feature/ogc 508 replace elastic search by postgres text search
core: Replace elastic search by postgres full text search
With this changes elastic search (es) is still in place and productive while we introduce the postgres full text search accessible using 'search_postgres' keyword in the url.
es url: http://localhost:8080/onegov_agency/bs/search?q=Arnold
psql url: http://localhost:8080/onegov_agency/bs/search_postgres?q=Arnold
hint: onegov-core upgrade
Main changes:
- Re-indexing
../onegov-cloud/src/onegov/search/cli.py - Upgrade script (uses the same code as re-indexing)
../onegov-cloud/src/onegov/search/upgrade.py - Extension of mixin class Searchable
.. /onegov-cloud/src/onegov/search/mixins.py - Adjusting all searchable models adding the fts index in postgres
Open Items:
- unit tests are not reworked yet
- language configuration
- improve ranking
Checklist
- [x] I have performed a self-review of my code
- [x] I considered adding a reviewer
- [x] I have added an upgrade hint such as data migration commands to be run
- [x] I made changes/features for both org and town6
- [ ] I have tested my code thoroughly by hand
- [x] I have tested database upgrades
- [ ] I have added tests for my changes/features