azureindexingazure-ai

Azure AI Search sample index for .msg email files


Does anyone know how to create Azure AI Search indexes for email .msg files?

I have been able to find sample indexes for JSON content but can't seem to find samples that index email content.

I would like to be able to create an index based on the common email properties: From, To, CC, Subject, Sent Date, and body.

I believe it would be something like:

    {
        "name": "email-index",  
        "fields": [
            {"name": "From", "type": "Edm.String", "key": true, "filterable": true},
            {"name": "To", "type": "Collection(Edm.String)",
                "fields": [
                "address1",
                "address2"
                ]
            }
            {"name": "CC", "type": "Collection(Edm.String)",
                "fields": [
                "address1",
                "address2"
                ]
            }
            {"name": "BCC", "type": "Collection(Edm.String)",
                "fields": [
                "address1",
                "address2"
                ]
            }
            {"name": "DateSent", "type": "Edm.DateTimeOffset", "searchable": true, "filterable": false, "sortable": false, "facetable": false, "analyzer": "en.lucene"},
            {"name": "Body", "type": "Edm.String", "searchable": true, "filterable": true, "sortable": true, "facetable": true},
        ]
    }

I can't fin samples for the .msg email fields to construct the index.


Solution

  • I was able to create an index and indexer that allows me to query based on the following fields: metadata_content_type metadata_message_from metadata_message_from_email metadata_message_to metadata_message_to_email metadata_message_cc metadata_message_cc_email metadata_message_bcc metadata_message_bcc_email metadata_creation_date metadata_last_modified metadata_subject

    https://learn.microsoft.com/en-us/azure/search/search-blob-metadata-properties