AI Search Indexer started failing with opperand type clash error

David Voicu 5 Reputation points
2025-03-03T10:41:04.9066667+00:00

Starting 26 Feb 2025 at around 2 PM EET, indexers on our Azure AI Search services started failing on all our environments at around the same time. The indexers have previously worked with no other issue. The error is Operand type clash: datetime2 is incompatible with timestamp.

We currently use a column named HighWatermark as the HighWatermark column with the SQL data type datetime2. In the c# indexer code, we have defined the model type used for the HighWatermark as Datetime (we have also tried to change it now to DateTimeOffset with no success).

[SimpleField(IsKey = true)]
public string DocumentKey { get; set; }

[SimpleField(IsFilterable = true)]
public int Id { get; set; }

[SimpleField(IsFilterable = true, IsFacetable = true)]
public int Type { get; set; }

[SimpleField(IsHidden = true)]
public DateTime HighWatermark { get; set; }

[SimpleField(IsFilterable = true, IsFacetable = true)]
public DateTimeOffset ModifiedDate { get; set; }

[...]

The first time when the indexer runs it seems to work successfully. But for later runs it always crashes with the mentioned error

User's image

This is the configuration for the AI Search Instance:

{
  "@odata.context": "...",
  "@odata.etag": "",
  "name": "...",
  "description": null,
  "type": "azuresql",
  "subtype": null,
  "credentials": {
    "connectionString": "..."
  },
  "container": {
    "name": "db_view",
    "query": null
  },
  "dataChangeDetectionPolicy": {
    "@odata.type": "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy",
    "highWaterMarkColumnName": "HighWatermark"
  },
  "dataDeletionDetectionPolicy": {
    "@odata.type": "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy",
    "softDeleteColumnName": "IsDeleted",
    "softDeleteMarkerValue": "true"
  },
  "encryptionKey": null,
  "identity": null
}

The HighWatermark is computed in DB view as

GREATEST(
			i1.[ModifiedDate],
			i1.[DeletedDate],
			i2.[ModifiedDate],
			i2.[DeletedDate],
			i3.[SettingsModifiedDate])
	   ) 

All of the columns are of type Datetime2(7).

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
42,669 questions
0 comments No comments
{count} vote

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.