Data type map for indexers (Azure AI Search)

When you're building an index schema for indexer-based indexing, the data types in source data must map to an allowed data type for the fields in the target index.

This article provides data type comparisons between SQL Data Types, JSON data types, and Azure AI Search. It contains the following sections:

SQL Server Data Type Allowed target index field types Notes
bit Edm.Boolean, Edm.String
int, smallint, tinyint Edm.Int32, Edm.Int64, Edm.String
bigint Edm.Int64, Edm.String
real, float Edm.Double, Edm.String
smallmoney, money

decimal

numeric
Edm.String Azure AI Search doesn't support converting decimal types into Edm.Double because doing so would lose precision.
char, nchar, varchar, nvarchar Edm.String

Collection(Edm.String). See Field Mapping Functions for details on how to transform a string column into a Collection(Edm.String)
smalldatetime, datetime, datetime2, date, datetimeoffset Edm.DateTimeOffset, Edm.String
uniqueidentifer Edm.String
rowversion N/A Row-version columns can't be stored in the search index, but they can be used for change tracking.
geography Edm.GeographyPoint, Edm.String If using geography data types, only geography instances of type POINT with SRID 4326 (which is the default) are supported. If using strings, only GeoJSON points in the following format are supported: {"type": "Point", "coordinates": [long, lat]}
time, timespan

varbinary

image

xml

geometry

CLR types
N/A Not supported.
JSON data type Allowed target index field types
bool Edm.Boolean, Edm.String
Integral numbers Edm.Int32, Edm.Int64, Edm.String
Floating-point numbers Edm.Double, Edm.String
string Edm.String
arrays of primitive types, for example [ "a", "b", "c" ] Collection(Edm.String)
Strings that look like dates Edm.DateTimeOffset, Edm.String
GeoJSON point objects Edm.GeographyPoint

GeoJSON points are JSON objects in the following format: {"type" : "Point", "coordinates": [long, lat]}
JSON objects Edm.ComplexType

Azure AI Search maps JSON objects to corresponding complex type schemas

See also