Open DennisBB opened 3 years ago
This sounds like a valid feature request and can be useful in testing. I think we could probably add a maskable option index.X.enable
which allows users to (temporarily) switch off a particular index backend.
If anyone is interested to work on this, Backend::getIndexes method can be a good starting point.
My use case: I want to start a graph without any configurations for index backends. And if I need their functionality later on, I can just add configuration to JanusGraph and it'll just work without me having to recreate the graph.
Also If I have index backends enabled, I can comment out their configuration and JanusGraph will just work without giving any errors and the functionality provided by index backends. Again, index backends only work when the configuration for them is included.
At the moment I have to enable index backends from the beginning, even if I'm not using them, because I may use them somewhere in the future.
Is there a way to make index backends pluggable?
For example I created a graph with cassandra + elasticsearch and it turns out I'm not gonna use elasticsearch for indices. So I decided to disable it in JanusGraph configuration and restart the server. After that it gave me an error that it can't connect to elasticsearch.
It would be good if we could disable and enable them at will. And JanusGraph will just work either with indices from index backends or without them without giving errors.