Visitor pattern instead of Function when return value is not necessary
Create a quiet Function
Use Enum IndexedDocumentType