I undestood how nested types work. But highlighting is not working with nested types.
On Wednesday, 27 August 2014 22:08:29 UTC+5:30, David Pilato wrote: > > You can't add your own subfields to the attachment field. > Though this should be doable but requires some work IMO. > > Also, I think you need to use nested documents. And add whatever field you > want in the nested doc (type, id...) and add the attachment field as well. > > HTH > > > -- > David ;-) > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs > > > Le 27 août 2014 à 18:27, sekharreddy mandapati <sekha...@gmail.com > <javascript:>> a écrit : > > 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 elasticsearc...@googlegroups.com <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/1c34c96f-c28f-4d4f-8c09-970160f9e669%40googlegroups.com > > <https://groups.google.com/d/msgid/elasticsearch/1c34c96f-c28f-4d4f-8c09-970160f9e669%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/491fba77-6c59-48e7-aef6-ac63c8d59b55%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.