The structure of data to index is like below:
{
"EmailId":"1", //should be stored
"EmailText":"hello world",
"Attachments":
{
"AttachmentId":"1", //should be stored
"FileName": "hello.txt" //should be stored
"AttachmentText":"this is first attachment text"
},
{
"AttachmentId":"2",
"FileName": "welcome.xlsx"
"AttachmentText":"this is second attachment text"
}
}
I could maintain a separate index for email body and attachment text, but is there any way we could do a multilevel indexing like above to maintain a single index? I should be able to search a keyword in the AttachmentText and get back the AttachmentId and EmailId.
I am using Lucene.Net but if there is any solution in Lucene Java then it is absolutely fine.
Thank you in advance.