Azure Search Service Upload Data To Index

In this article, we will learn about the methods we can use to upload the application data to Azure Search Index.

In our previous articles related to Azure Search Service, we have learned the following:

In this article, we will discuss the methods supported, as of this writing, to load data into the Azure Search Indexes.

Currently, there are two ways in which you could upload your application specific data to the Azure Search Index.

  1. Push data to Azure Search Index
  2. Pull data from a data source and insert data into Azure Search Index

Method 1 Push data to Azure Search index

As of this writing, you can push your data into Azure Index only through .NET SDK or REST API, provided by Microsoft Azure.

  1. Prepare your Index Schema on Azure Search Service.

  2. Prepare your Application specific data in the format that Azure Search expects. It’s optional that your Application data source type is compatible with Azure Search. Azure Search need not be aware of your application data source.

  3. Get the Search Service Admin Keys.

  4. Use .NET SDK or REST API to do Bulk Inserts of the data that you have prepared in the 2nd step to Azure Search Index.


Other important notes about this Push method -

  1. You can push either a single document or bulk documents.
  2. For bulk inserts, you can only push 1000 documents at a time.
  3. The maximum size that you can bulk insert at a time is 16 MB.

This is the most flexible way to push data to your Azure Search Index as you would be preparing the data as per the .NET SDK or the REST API, irrespective of where your application data is stored.

Method 2: Pull data from a data source and insert data into Azure Search Index

As of this writing, this option automatically crawls the data from the following data sources.

  • Azure SQL Database
  • SQL Server on Azure VMs
  • Azure Document DB
  • Azure Blob Storage (Preview as of this writing)
  • Azure Table Storage (Preview as of this writing)

In this method, we don’t need to pass any data to Azure Search. We just need to connect these Data Sources to Azure Search. We would discuss about this method in detail in the upcoming articles.



Summary

In this article, we have learned about the methods that are available currently for populating the data to the Azure Search Index.

  • Push Method using .NET SDK / REST API
  • Pull method using Indexers.

Hope you enjoyed reading the article. Your feedback is appreciated. You can read the original article here


Similar Articles