class LuceneDeleteEngine {

    public void deleteDocFromIndex(final String fileName) {
        try {
            Term term = termFactory.createTerm(fieldName, fileName);
            indexWriter.deleteDocuments(term);
        } catch (IOException e) {
            throw new SystemException("Could not delete file " + fileName + " from the index. Reason:" + e.getMessage());
        }
    }

}