We have requirement of indexing email which have multiple attachments and we have to highlight the search results. How can i map the highlight string array to my multiple attachments.
My index mapping is { "document":{ "properties":{ "attachmentContent":{ "type":"attachment", "path":"full", "fields":{ "attachmentContent":{ "type":"string", "term_vector":"with_positions_offsets", "store":true } } } } } } My indexed document is {"userId":2,"attachmentContent":[{"content":"VGhpcyBpcyBudW1iZXIgb25lLg==","serviceAttachmentId":"1","fileName":"1.txt","type":"xml"}, { {"content":"IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg==","serviceAttachmentId":"2","fileName":"2.txt","type":"excel"}] } My Questions are 1.How can i access the "serviceAttachmentId" inside the "attachmentContent" field which is of type attachment. 2.How can i filter the documents based on type. -- 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 elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1c34c96f-c28f-4d4f-8c09-970160f9e669%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.