diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py
index 0e511035c0e9f16253678cad0c79386e6a8e1dbc..3a6107ded0aa66ce64b20cbf592a5bd73c933179 100644
--- a/ckanext/odsh/plugin.py
+++ b/ckanext/odsh/plugin.py
@@ -333,6 +333,10 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm
 
 
     def before_index(self, dict_pkg):
+        debug = config.get('ckanext.odsh.debug',False)
+        slave = config.get('ckanext.odsh.slave',False)
+        if debug and slave:
+            raise 'indexing on slave not allowed'
         # make special date fields solr conform
         fields = ["issued", "temporal_start", "temporal_end"]
         for field in fields: