Custom Skill Set not Populating in final Index Document

Ujjwal Dalmia 0 Reputation points
2024-07-02T22:06:11.9433333+00:00

Dear Community, need your urgent support here.

Objective

I am trying to create a custom skill in the Azure AI search. The skill is a functions all written in python. In the skill, we are using the metadata_storage_name and using this as a key (both partition and row) to extract dates from Azure Storage Table.

Issue

My functions app is generating the required skill information in the desired Output JSON - Pasting here for your reference:

{"values": [{"recordId": "a1", "data": {"from_date": "2023-07-01T00:00:00+00:00", "to_date": "9999-12-31T00:00:00+00:00"}, "errors": [], "warnings": []}]}

But this information is not getting populated in the final search index.

My Skillset definition and indexer output mapping are as follows:

Skillset Definition

{
      "@odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
      "name": "gettofromdate",
      "description": "custom skill to get to date and from date for each document",
      "context": "/document",
      "uri": "https://envestdates.azurewebsites.net/api/tofromdate?code=functionskey",
      "httpMethod": "POST",
      "timeout": "PT30S",
      "batchSize": 1,
      "degreeOfParallelism": 1,
      "authResourceId": null,
      "inputs": [
        {
          "name": "pds_name",
          "source": "/document/metadata_storage_name"
        }
      ],
      "outputs": [
        {
          "name": "from_date",
          "targetName": "fromdate"
        },
        {
          "name": "to_date",
          "targetName": "todate"
        }
      ],
      "httpHeaders": {},
      "authIdentity": null
    }

Indexer Configuration - Output Field Mapping

"outputFieldMappings": [
    {
      "sourceFieldName": "/document/from_date",
      "targetFieldName": "from_date"
    },
    {
      "sourceFieldName": "/document/to_date",
      "targetFieldName": "to_date"
    }
  ],

Please suggest what am I doing wrong here?

Also, when I run a debug session, I don't get any error or warning and the skill also populates the fields

Thanks for the support

Ujjwal Dalmia

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,053 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.