Is it possible to index CSV file name without extension + literal string + CSV field value in Azure AI search?

I have CSV files on Azure Blob Storage which contain a field Type (among other fields). I use indexer parsing mode delimitedText to split them into documents – one per row. The AI enrichment tree for such a document should contain the node /document/Type.

According to https://learn.microsoft.com/en-us/azure/search/search-howto-indexing-azure-blob-storage when indexing Azure Blobs one also gets metadata nodes like /document/metadata_storage_name and /document/metadata_storage_path.

For example, suppose I have a file xyz.csv and there is a record inside with Type = abc. Then this record presumably (I think) will have /document/Type = "abc" and /document/metadata_storage_name = "xyz.csv" in the AI enrichment tree.

Assuming I get it so far, can I somehow generate a new field for the index that would combine the file name without the extension and the type using a certain literal string to separate the two?

In my example I would like this field to have the value of abc @ xyz.

Can it be done without a custom skill?

To achieve without custom skill set you need to use MergeSkill, SplitSkill and a mapping function extractTokenAtPosition to get only the file name without extension.

First, create 2 new fields filename and combinedText, both are of string type.

Next, in indexer definition you add the mapping function in field mappings like below. This extracts only filename.

"fieldMappings": [
    {
      "sourceFieldName": "AzureSearch_DocumentKey",
      "targetFieldName": "AzureSearch_DocumentKey",
      "mappingFunction": {
        "name": "base64Encode",
        "parameters": null
      }
    },
    {
      "sourceFieldName": "metadata_storage_name",
      "targetFieldName": "filename",
      "mappingFunction": {
        "name": "extractTokenAtPosition",
        "parameters": {
          "delimiter": ".",
          "position": 0
        }
      }
    }
  ],

Refer about this here.

Use text split skill to convert this string to array of string.
Since it is the type accepted by merge skill.

Create a skill set like below.

{
  "name": "skillset1725958890028",
  "description": "",
  "skills": [
    {
      "@odata.type": "#Microsoft.Skills.Text.SplitSkill",
      "textSplitMode": "pages",
      "defaultLanguageCode": "en",
      "inputs": [
        {
          "name": "text",
          "source": "/document/filename"
        }
      ],
      "outputs": [
        {
          "name": "textItems",
          "targetName": "arrayresult"
        }
      ]
    },
    {
      "@odata.type": "#Microsoft.Skills.Text.MergeSkill",
      "name": "CombineFieldsSkill",
      "description": "Combines multiple fields into a single string",
      "context": "/document",
      "insertPreTag": "@",
      "insertPostTag": "",
      "inputs": [
        {
          "name": "text",
          "source": "/document/Type"
        },
        {
          "name": "itemsToInsert",
          "source": "/document/arrayresult"
        }
      ],
      "outputs": [
        {
          "name": "mergedText",
          "targetName": "combined_field"
        }
      ]
    }
  ],
  "cognitiveServices": {
    "@odata.type": "#Microsoft.Azure.Search.DefaultCognitiveServices"
  }
}

Add output field mappings in indexer to populate the results.
Below is the full indexer definition.

{
  "@odata.context": "https://xyx.search.windows.net/$metadata#indexers/$entity",
  "@odata.etag": ""0x8DCD17A4933D27D"",
  "name": "azureblob-indexer",
  "description": "",
  "dataSourceName": "ds",
  "skillsetName": "skillset1725958890028",
  "targetIndexName": "azureblob-index",
  "disabled": null,
  "schedule": null,
  "parameters": {
    "batchSize": null,
    "maxFailedItems": 0,
    "maxFailedItemsPerBatch": 0,
    "base64EncodeKeys": null,
    "configuration": {
      "dataToExtract": "contentAndMetadata",
      "parsingMode": "delimitedText",
      "firstLineContainsHeaders": true,
      "delimitedTextDelimiter": ",",
      "delimitedTextHeaders": ""
    }
  },
  "fieldMappings": [
    {
      "sourceFieldName": "AzureSearch_DocumentKey",
      "targetFieldName": "AzureSearch_DocumentKey",
      "mappingFunction": {
        "name": "base64Encode",
        "parameters": null
      }
    },
    {
      "sourceFieldName": "metadata_storage_name",
      "targetFieldName": "filename",
      "mappingFunction": {
        "name": "extractTokenAtPosition",
        "parameters": {
          "delimiter": ".",
          "[email protected]": "#Int64",
          "position": 0
        }
      }
    }
  ],
  "outputFieldMappings": [
    {
      "sourceFieldName": "/document/combined_field",
      "targetFieldName": "combinedText"
    }
  ],
  "cache": null,
  "encryptionKey": null
}

Output:

Recognized by Microsoft Azure Collective

8

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật