Azure Search Service Upload data to Index

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

In this article, we will discuss about 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

Method1: 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.

  • Prepare your Index Schema on Azure Search Service
  • 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.
  • Get the Search Service Admin Keys
  • 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

0_pushmethoddiagram

Other important notes about this Push method:

  • You can push either a single document or bulk documents.
  • for Bulk Inserts, you can only push 1000 documents at a time
  • 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 expects irrespective of where your application data is stored.

Method2: 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.

0_pullmethod

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.

2 comments

  1. How would you show different results for internal and external users using azure search for searching documents? And would you embed the metadata like this doc is for internal users only and they can only be able to view not download etc etc

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s