public void Index(Document postModel) { var post = new OCR_DocumentType { FileHash = postModel.FileHash, FileName = postModel.FileName, Content = postModel.Content, }; _elastic.Index(post); }
public void Index(OCR_DocumentType document) { _elastic.Index(document, i => i.Id(document.FileHash.ToString()) .Index(_indexName) .Type <OCR_DocumentType>()); }