public void InsertTextFile(string filePath)
 {
     _client
     .IndexDocument(
         TextFileReader.ReadFileFromPath(filePath)
         )
     .Validate();
 }
        public void InsertFilesInFolder(string folderPath)
        {
            var descriptor = new BulkDescriptor();

            foreach (var doc in TextFileReader.ReadAllFilesInDirectory(folderPath))
            {
                descriptor
                .Index <Document>(d => d
                                  .Document(doc)
                                  );
            }

            _client
            .Bulk(descriptor)
            .Validate();
        }