Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying configuration files at runtime #158

Open
quasarea opened this issue Sep 29, 2017 · 5 comments
Open

Modifying configuration files at runtime #158

quasarea opened this issue Sep 29, 2017 · 5 comments

Comments

@quasarea
Copy link

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).

@boyter
Copy link
Owner

boyter commented Oct 2, 2017

It does require a reindex when this happens. Its one of the things that is now possible with the blue/green index.

@quasarea
Copy link
Author

quasarea commented Oct 3, 2017

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.

@boyter
Copy link
Owner

boyter commented Oct 3, 2017

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.

@quasarea
Copy link
Author

quasarea commented Oct 9, 2017

Wouldn't it be possible to store those data per index and reload with flip?

@boyter
Copy link
Owner

boyter commented Oct 9, 2017

Thats correct. It is done per index. With a reload function a flip would need to follow to ensure that the index is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants