@Override
  protected void doDelete(Object obj) throws Exception {
    DLFileEntry dlFileEntry = (DLFileEntry) obj;

    FileModel fileModel = new FileModel();

    fileModel.setCompanyId(dlFileEntry.getCompanyId());
    fileModel.setFileName(dlFileEntry.getName());
    fileModel.setPortletId(PORTLET_ID);
    fileModel.setRepositoryId(dlFileEntry.getDataRepositoryId());

    Indexer indexer = IndexerRegistryUtil.getIndexer(FileModel.class);

    indexer.delete(fileModel);
  }
  @Override
  protected Document doGetDocument(Object obj) throws Exception {
    DLFileEntry dlFileEntry = (DLFileEntry) obj;

    FileModel fileModel = new FileModel();

    long[] assetCategoryIds =
        AssetCategoryLocalServiceUtil.getCategoryIds(
            DLFileEntry.class.getName(), dlFileEntry.getFileEntryId());

    fileModel.setAssetCategoryIds(assetCategoryIds);

    String[] assetCategoryNames =
        AssetCategoryLocalServiceUtil.getCategoryNames(
            DLFileEntry.class.getName(), dlFileEntry.getFileEntryId());

    fileModel.setAssetCategoryNames(assetCategoryNames);

    String[] assetTagNames =
        AssetTagLocalServiceUtil.getTagNames(
            DLFileEntry.class.getName(), dlFileEntry.getFileEntryId());

    fileModel.setAssetTagNames(assetTagNames);

    fileModel.setCompanyId(dlFileEntry.getCompanyId());
    fileModel.setCreateDate(dlFileEntry.getCreateDate());
    fileModel.setFileEntryId(dlFileEntry.getFileEntryId());
    fileModel.setFileName(dlFileEntry.getName());
    fileModel.setGroupId(dlFileEntry.getGroupId());
    fileModel.setModifiedDate(dlFileEntry.getModifiedDate());
    fileModel.setPortletId(PORTLET_ID);
    fileModel.setProperties(dlFileEntry.getLuceneProperties());
    fileModel.setRepositoryId(dlFileEntry.getDataRepositoryId());
    fileModel.setUserId(dlFileEntry.getUserId());
    fileModel.setUserName(dlFileEntry.getUserName());
    fileModel.setUserUuid(dlFileEntry.getUserUuid());

    Indexer indexer = IndexerRegistryUtil.getIndexer(FileModel.class);

    return indexer.getDocument(fileModel);
  }