Example #1
0
        public void Index(Document postModel)
        {
            var post = new OCR_DocumentType
            {
                FileHash = postModel.FileHash,
                FileName = postModel.FileName,
                Content  = postModel.Content,
            };

            _elastic.Index(post);
        }
Example #2
0
 public void Index(OCR_DocumentType document)
 {
     _elastic.Index(document, i => i.Id(document.FileHash.ToString())
                    .Index(_indexName)
                    .Type <OCR_DocumentType>());
 }