Tweaking the TEXT SEARCH CONFIGURATION with an existing database
We realized we forgot to adjust the TEXT SEARCH CONFIGURATION in PostgreSQL for a Nuxeo database, to make the full text searches accent-insensitive.
We tested the
CREATE EXTENSION unaccent; etc. commands on a medium-sized Nuxeo, which worked well except the first login after launching Nuxeo took longer than usual.
I reckon this is more PostgreSQL-related, but does the database have to rebuild the whole index after making changes to this configuration? This could be a problem if we execute the script on our production database, which is much larger than the first one (we don't want to end up with Nuxeo being frozen for… an undefinite amount of time).
Thanks for your advice
Somehow when default-repository-config.xml is modified, Nuxeo must be able to detect this and tell Postgres to rebuild its index. The question is really: does it do this on startup, at first nxql query, some other time?
Nuxeo does not automatically rebuild fulltext indexes when the fulltext configuration changes. The slowdown you're seeing must be coming from somewhere else.
If you changed the fulltext configuration you'll need to reindex everything, the nuxeo-reindex-fulltext addon can do that for you.
Besides I'm uncertain how changing the repo.xml would change the function used to build the index. I'm hardly a PostgreSQL expert but I understand you can't change a function, only drop it and recreate it. And dropping the nx_to_tsvector function would either not work or drop the fts indexes too (depending on whether the drop is cascaded) - in which case they need to be rebuilt manually.
The addon is designed to do other kinds of reindexing, when for instance new binary converters have been added to Nuxeo, or new fields have been added to (or removed from) the indexable fields.