How do I check if my .eml file has single or multiple attachments in it In Azure AI Search.
Currently these are my fields that I have added in my Index. Now how I am going to check that how many attachments are in them for example this .eml file have 1 attachment and this .eml file have 2 attachments.
Azure AI Search
-
VenkateshDodda-MSFT 22,401 Reputation points • Microsoft Employee
2024-05-21T08:48:18.4333333+00:00 @Hassan Kaleem Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this
I am checking with internally on this and will update you here once I hear back from them.
Meanwhile can you confirm are you trying to create an indexer from the azure files or are you trying to create any other indexer? If azure files, please note that current this is in public preview and creating the indexer is not possible through portal.
But the above image that you shared is related to indexer configuration from portal I am unsure how you are configuring this.
-
Hassan Kaleem 45 Reputation points
2024-05-21T09:55:11.4066667+00:00 I have added this variable in the skillset and in Indexer as well, Still i am getting Null AttachmentCount.
SkillSet{ "@odata.type": "#Microsoft.Skills.Util.ShaperSkill", "name": "AttachmentCountShaper", "description": "Count attachments", "context": "/document/metadata", "inputs": [ { "name": "attachments", "source": "/document/metadata/attachments" } ], "outputs": [ { "name": "output", "targetName": "attachmentCount" } ] }
Indexer
{ "sourceFieldName": "/document/metadata/attachmentCount", "targetFieldName": "attachmentCount" }
-
VenkateshDodda-MSFT 22,401 Reputation points • Microsoft Employee
2024-05-21T10:35:21.4066667+00:00 @Hassan Kaleem Thanks for your response. Could you please help us more details step-by-step what exactly you trying to do and also the configuration involved as well.
To understand and assist you better on this issue.
-
Hassan Kaleem 45 Reputation points
2024-05-22T05:31:58.1766667+00:00 I have to count the attachments in the eml file, first i added a column in the indexes, then updated the skillset to count the attachment @odata.type": "#Microsoft.Skills.Util.ShaperSkill, finally i added that in the indexer, But still the attachment count is null.
-
VenkateshDodda-MSFT 22,401 Reputation points • Microsoft Employee
2024-05-23T07:56:03.23+00:00 @Hassan Kaleem I have checked with internal team on your ask, currently there is no way to currently count attachments. Based on the details and screenshot that you have shared the functionality you are using is not supported.
You can find the skillset language and what is possible here: Skill context and input annotation reference language - Azure AI Search | Microsoft Learn
However, you can add your own logic through a custom skill (Custom Web API skill in skillsets - Azure AI Search | Microsoft Learn, with the definition similar to the below, but add the logic to the function app
{ "@odata.type": "#Microsoft.Skills.Custom.WebApiSkill", "description": "A custom skill that counts the number of attachments in a blob", "uri": "https://my-custom-skill.azurewebsites.net/api/CountAttachments", "httpMethod": "POST", "timeout": "PT30S", "batchSize": 1, "context": "/document", "inputs": [ { "name": "blob", "source": "/document" } ], "outputs": [ { "name": "attachmentCount", "targetName": "attachmentCount" } ] } ],
-
Hassan Kaleem 45 Reputation points
2024-05-23T08:07:12.6233333+00:00 It is not working too,
-
VenkateshDodda-MSFT 22,401 Reputation points • Microsoft Employee
2024-05-27T08:12:33.3+00:00 @Hassan Kaleem Thanks for response and apologize for the delay in my response.
As suggested earlier have you create custom skillset and you are trying to count the attachments?
-
VenkateshDodda-MSFT 22,401 Reputation points • Microsoft Employee
2024-05-29T04:50:03.8+00:00 @Hassan Kaleem Following up to see if you have a chance to check the previous response and helped. Do let me know if you have any further questions on this.
Sign in to comment