I was talking about this: 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 27 août 2014 à 19:08, sekharreddy mandapati <sekhar4...@gmail.com> a écrit 
> :
> 
> An email contain multiple attachments. This number is not fixed. How can we 
> define nested documents if we our things are dynamic.
> 
>> On Wednesday, 27 August 2014 22:17:23 UTC+5:30, sekharreddy mandapati wrote:
>> Thanks David,
>> 
>> I am using the following mapping. Can u please tell me the mapping for 
>> nested documents.
>> 
>> {
>> "document":{
>>     "properties":{
>>            "attachmentContent":{
>>                 "type":"attachment",
>>                 "path":"full",
>>                 "fields":{
>>                    "attachmentContent":{
>>                          "type":"string",
>>                          "term_vector":"with_positions_offsets",
>>                          "store":true
>>                     }
>>                  }
>>             }
>>       }
>>    }
>> }
>> 
>>> 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> 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.
>>> 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.
> 
> -- 
> 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/bc509a84-aba2-47b6-a943-4221412be214%40googlegroups.com.
> 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/E8BDE0CC-7E8C-4162-AC29-1E8C8CDDC2C1%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to