Mapper Plugin Issues

I am using ElasticSearch mapper plugin for indexing contents for pdf, xls,
ppt file types. My mapping is as follows:

    Name = "IndexDocument",
    SearchAnalyzer = "standard",
    IndexAnalyzer = "standard",
    DateDetection = true,
    NumericDetection = true
public class Document
    public string id { get; set; }
    [ElasticProperty(Type = Nest.FieldType.attachment, Store = false, TermVector = Nest.TermVectorOption.with_positions_offsets)]
    public ESAttachment esAttachment { get; set; }

public class ESAttachment
    public string _content_type { get; set; }
    public string _name { get; set; }
    public string content { get; set; }

Here is the code for indexing:


    var item = new Document();
    item.esAttachment = new ESAttachment();
    item.esAttachment._content_type = "application/pdf";
    item.esAttachment.content = Convert.ToBase64String(System.IO.File.ReadAllBytes(file));
    item.esAttachment._name = "test-pdf";

    List<Document> bulkDoc = new List<Document>();

    var des = new BulkDescriptor();
    foreach (var doc in bulkDoc)
        des.Index<Document>(j => j.Object(doc).Index("indexname"));

    var status = esClient.BulkAsync(des);

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit