Data type map for indexers in Azure Search

When building a schema for an indexer, the data types used in the data source 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 Search. It contains the following:

For more information, see Indexer operations (Azure Search Service REST API) for links to topics about indexers and data sources.

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 Search does not 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 cannot be stored in the search index, but they can be used for change tracking.
geography Edm.GeographyPoint Only geography instances of type POINT with SRID 4326 (which is the default) are supported.
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, e.g. [ "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 N/A

Not supported; Azure Search currently supports only primitive types and string collections

See also