diff --git a/hooks.py b/hooks.py
index c2966ba5d1425eaf76f7b924679bfa82fd850991_aG9va3MucHk=..3ec6b48458813f6d086ba77406f8d8b07d82b791_aG9va3MucHk= 100644
--- a/hooks.py
+++ b/hooks.py
@@ -54,6 +54,9 @@
     def precommit_event(self):
         indexer = self.cnx.vreg['es'].select('indexer', self.cnx)
         es = indexer.get_connection()
+        if es is None:
+            log.info('no connection to ES (not configured) skip ES indexing')
+            return
         for entity in self.get_data():
             rql = fulltext_indexable_rql(entity.cw_etype,
                                          entity._cw.vreg.schema,
@@ -74,4 +77,3 @@
                 es.index(**kwargs)
             except (ConnectionError, ProtocolError):
                 log.debug('Failed to index in hook, could not connect to ES')
-