static boolean useShadowEngine(boolean primary, Settings indexSettings) {
   return primary == false && IndexMetaData.isIndexUsingShadowReplicas(indexSettings);
 }
 /**
  * Indicated whether this operation should be replicated to shadow replicas or not. If this method
  * returns true the replication phase will be skipped. For example writes such as index and delete
  * don't need to be replicated on shadow replicas but refresh and flush do.
  */
 protected boolean shouldExecuteReplication(Settings settings) {
   return IndexMetaData.isIndexUsingShadowReplicas(settings) == false;
 }