code: private Document indexDocument(EntityMetadata metadata, final MetamodelImpl metaModel, Object object,
              String parentId, Class<?> clazz)
      {
  
          if (log.isDebugEnabled())
          {
              log.debug("Indexing @Entity[{}],{} ", metadata.getEntityClazz().getName(), object);
          }
  
          // In case defined entity is Super column family.
          // we need to create seperate lucene document for indexing.
          Document currentDoc = updateOrCreateIndex(metadata, metaModel, object, parentId, clazz, false);
  
          return currentDoc;
  
      }
docs: Index document.
  
  @param metadata
  the metadata
  @param object
  the object
  @param parentId
  the parent id
  @param clazz
  the clazz
  @return the document