diff --git a/entities.py b/entities.py
index 4223ea3c88ceed601f4d62e03a85314fb87cccfa_ZW50aXRpZXMucHk=..372faf22c1e38586c044fa17c05c5e1e0687640e_ZW50aXRpZXMucHk= 100644
--- a/entities.py
+++ b/entities.py
@@ -19,7 +19,7 @@
 
 import collections
 
-from cubicweb import view
+from cubicweb import view, neg_role
 from cubicweb.predicates import is_instance
 
 from cubicweb.appobject import AppObject
@@ -109,3 +109,20 @@
             data['parent'] = entity.entry_of[0]
         """
         pass
+
+
+class File(IFullTextIndexSerializable):
+    __select__ = IFullTextIndexSerializable.__select__ & is_instance('File')
+
+    def serialize(self, complete=False):
+        """this could be a generic implementation of fulltext_containers indexation, but for
+
+        now we can not return more than one parent json which is fine
+        for Files
+        """
+        for rschema, role in self._cw.vreg.schema['File'].fulltext_containers():
+            for parent in self.entity.related(
+                    rschema.type, role=neg_role(role)).entities():
+                return parent.cw_adapt_to(
+                    'IFullTextIndexSerializable').serialize(complete)
+        return {}
diff --git a/hooks.py b/hooks.py
index 4223ea3c88ceed601f4d62e03a85314fb87cccfa_aG9va3MucHk=..372faf22c1e38586c044fa17c05c5e1e0687640e_aG9va3MucHk= 100644
--- a/hooks.py
+++ b/hooks.py
@@ -43,8 +43,6 @@
     category = 'es'
 
     def __call__(self):
-        if self.entity.cw_etype == 'File':
-            return  # FIXME hack!
         IndexEsOperation.get_instance(self._cw).add_data(self.entity)
 
 
@@ -60,8 +58,6 @@
         for entity in (self._cw.entity_from_eid(self.eidfrom),
                        self._cw.entity_from_eid(self.eidto)):
             cw_etype = entity.cw_etype
-            if cw_etype == 'File':
-                return  # FIXME hack!
             if (cw_etype in indexable_types(entity._cw.vreg.schema) or
                     cw_etype in CUSTOM_ATTRIBUTES):
                 IndexEsOperation.get_instance(self._cw).add_data(entity)