In this post I will show how you can add indexes on JSON properties in product catalog. In SQL Server 2016, you can use two type of indexes on JSON text:
- Index on computed column that index some specific properties in JSON.
- Full text search index that can index all key:value pairs in JSON objects.
This is the downside to JSON not being an official type: indexing is somewhat limited. In comparison, you could create XML indexes which were specially-designed to do the job of searching for text within an XML field.