Allow custom defined Field Mapping Function
Currently when defining the indexers, one can specify the field mappings from source to target fields. Only a limited set of functions such as Extract token at position etc are supported. It would be desirable to support Func syntax such that each row is passed onto the func which then decide the target field value based on developer defined logic in func.
Eg: we have a cosmo db source and a azure table storage data source. The partition key for cosmo db collection is combination of tenantId:studentId for efficient read/writes across partitions based on our data. The azure table storage partition key is tenant id and student id is the row key. Some business function specific details about the student are stored in table storage and are managed by different microservice that is NOT responsible for the central student service (uses cosmo db).
There is a special field 'Key' that ATS Data source provides in azure search which is PKRK combination. But as in cosmo db we have : in those we need some way to make sure the index row that is updated is same so that search on combined set of fields from multiple sources can be performed.
We recently introduced a capability of Azure Search that we call Cognitive Search.
Cognitive Search allows you to apply enrichment and transformation steps to your data that we call Cognitive Skills. You can select from predefined skills or apply your own custom skill.
The best way to transform your input data when you want to define your own function would be through a custom skill that you run as part of your enrichment pipeline.
You can read how to do this at https://docs.microsoft.com/en-us/azure/search/cognitive-search-custom-skill-interface