![]() To create the data source, I added the following code to my AzureSearchHelper class. My code will connect to this storage account and use these files to populate my index. Here is what the storage account looks like: In that container, I had four articles I’ve written, because I really like looking at my own ramblings over and over. In my case, this was my media library for my image uploads within my site. This meant having a specific container for my files that I could point my data source to. The next step of the process was to create a data source for blobs. Note that I am using my Azure Search service credentials to connect to the service. _searchClient = new SearchServiceClient(searchServiceName, new SearchCredentials(apiKey)) Create an HTTP reference to Azure Search String apiKey = ValidationHelper.GetString(ConfigurationManager.AppSettings, "") String searchServiceName = ValidationHelper.GetString(ConfigurationManager.AppSettings, "") This object is used to connect to Azure Search in all of my functions. In my AzureSearchHelper class, I created a SearchServiceClient object in my constructor. In the NuGet Package Manager, I updated my package to latest version (3.0.2 at the time of this article). All of the existing functionality in my AzureSearchHelper class is identical to the REST API code in the previous article, however, has been updated to use the SDK.īecause the functionality to index blobs was recently introduced, my first step was to update the SDK within my application.I’ve added functions to this class for the demo. For my MVC application, I have a “helper” class named AzureSearchHelper.cs that contains all of my code.My new implementation is done with an MVC application and using the SDK. My previous blog was targeted at Web Forms developing using Kentico Web Parts. ![]() I am building on top of my previous code so there are some pieces that may be mentioned in the article. ![]() In December, Microsoft added this functionality to the SDK to simplify the process. This was accomplished by making straight REST service calls and I demoed it frequently during my presentations. There are several features Microsoft has continued to add and improve within Search, including the ability to search blobs (files) in Azure Storage. If you want to learn more about the original code, check out the blog here. For this blog, I’ll be adding functionality to this new code. I have since rewritten the integration using an MVC site, while still pulling from the Kentico 9 EMS database. In my previous demo, I used a Kentico 9 site to hold my Azure Search functionality, as well as retrieve data from my Kentico EMS database. ![]() Prior to last December, this SDK allowed developers to create and index data from a variety of sources, all by using. Microsoft is continually updating the REST API, but the SDK tends to lag a little behind as they have to build the functionality into the service first. This SDK is actually a wrapper for the underlying REST service for Search. Since that time, Microsoft has released an SDK for. In my example, I showed how to use REST service calls to create indexes, populate the data, and perform searches against the service. In my previous blog post, I demonstrated how to integrate Azure Search with a Kentico application. With search being such an important part of any site, Azure Search is one of the most usable and configurable services offered. Whether it’s the unique hosting capabilities or the ability to integrate systems, Microsoft’s cloud platform has something to benefit nearly any application. BackgroundĪzure has always been one of my favorites platforms to develop with. In this article, I’ll show some new functionality Microsoft added to the Azure Search SDK to index and search blobs (files) in Azure Storage. In previous blogs, I’ve demonstrated how to integrate this service with Kentico. While many developers are familiar with Microsoft Azure and other cloud platforms, I’ve found many people still haven’t used Azure Search. Over the past few years, I have spoken on Azure Search several times at user groups and conferences around the world.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |