Modifying configuration files at runtime
I often modify files like \include\classifier\database.json or \searchcode.properties to fine tune search results by adding new languages and extensions or blacklisting files. Usually I end up with Recrawl & Rebuild indexes after such changes. Wonder if it could be done more dynamically (I don't know if its required now but I guess so).
It does require a reindex when this happens. Its one of the things that is now possible with the blue/green index.
I did some tests and it seems that reclawl is not necessary as long as I restart service.
I.e. if I add new type or extension to existing type, then restarting service and re-indexing repository will make new type/extension appear.
Similarly if I add new blacklist extension after restart and reindex it will be gone.
I would like to do this without restarting. like a button to flush/reload all configs or at least .json ones and possibly black/white lists as some other like repo path should not be updated during runtime I guess.
You could separate settings to two files or store black/white lists in .json to make it more distinct.
Its not the recrawl per-say but the reindex. Since a restart triggers a full re-index of everything you are observing the result of this. It reloads all configuration and when the index is preprocessed everything is as you would expect.
As such while a reload of settings would work for newly modified files you would still want to reindex in order to ensure everything is picked up as expected.
Wouldn't it be possible to store those data per index and reload with flip?
Thats correct. It is done per index. With a reload function a flip would need to follow to ensure that the index is correct.