Hello,
I have stored emails in solr, with its attachments as child documents.
As per solr structure these attachments got stored in same lines as of
mails.
Ex:
{ "id":"1528801242887_f662e5fe-b5d7-4494-acab-c1a99e6cd025", "attachmentName
":"example_multipage.doc", "attachmentType":"application/msword", "_version_
":1603064318599888896}, { "id":"1528801242887", "internetMessageId":
"1528801242887", "mailboxMessageId":"MailBox_4", "from":"
mitur...@verizon.net", "to":["podmas...@live.com"], "cc":["gslon...@aol.com"
], "bcc":["notic...@msn.com", "bes...@gmail.com"], "subject":"Getting
Started", "mailBody":"\n\nGoogle's headquarters, the Googleplex, in August
2014\n ", "mailReceiveDate":"2018-05-07T12:33:51Z", "hasAttachment":true, "
_version_":1603064318599888896}

}

Now I want to perform search. What will be search query for:

I want to search a keyword everywhere and return the respective
"internetMessageId".
i.e.
#1 if word found in mail document -- return internetMessageId
#2 if word found in attachment document document -- return internetMessageId
(By fq==>{!parent which=internetMessageId:* v=attachmentName:*})

For achieving both i have store every fields content in "_text_" field
(using copy field) . I can achieve both #1 & #2 individually. I want to do
both in single result i.e give me internetMessageId of all mails as well as
the mails whose attachment contains the the queried word.


How can I achieve this??


Thanks,
Rushikesh Garadade

Reply via email to