We have been wondering how to differentiate the "Elasticsearch" from "Lucene embedded" storage types properly. The current code relies on "instanceof" and knowledge about which implementations we have, but this is not extensions friendly (nor future friendly). An enum was proposed, but that's a closed set. So I'm suggesting to use a "marker Class": anyone adding a jar or a dependency would be adding a Class anyway; it's conceptually similar to looking at the type of the IndexManager but the constant can be reused by alternative implementations. |