Reputation: 1400
I am using the Preview of the Azure Search Blob Indexer. All of the data that is indexed is contained in the metadata of the blobs. I have therefore set AzureSearch_SkipContent to 'true' to prevent content indexing.
I am having trouble getting DateTimeOffset fields to work, as I cannot figure out the correct format to store the DateTimeOffset value as.
When I create the indexer, I get an error response (400 Bad Request) with the response body holding the following content:
{"error":{"code":"","message":"Column 'ProcessDT' is of type String that is not compatible with the field of type Edm.DateTimeOffset in the index"}}
I have tried various string formats (the value on the blob I tested is
2015-01-03T11:13:00.000+01:00
so it should correspond to a format that is compatible to OData 4.0 and therefore azure search as stated here: https://msdn.microsoft.com/en-us/library/azure/dn798938.aspx
Upvotes: 0
Views: 303
Reputation: 4671
converting strings into DateTimeOffset field values is not currently supported. We recognize this is a painful limitation, and will address this in the near future. As a partial workaround, you can index those values as strings (so you can format them as you wish and still use them for search and filtering). Thanks for bringing this up!
Upvotes: 1