code: def addtoindex(self,norecurse=None):
          
          if not norecurse: norecurse = (Word, Morpheme, Phoneme)
          if self.id:
              self.doc.index[self.id] = self
          for e in self.data:
              if all([not isinstance(e, C) for C in norecurse]):
                  try:
                      e.addtoindex(norecurse)
                  except AttributeError:
                      pass
docs: Makes sure this element (and all subelements), are properly added to the index