Join Chander Dhall for an in-depth discussion in this video Azure Search overview, part of Azure Search for Developers.
- [Instructor] Azure Search is platform as a service. You get different kinds of APIs that you can work with. That means it's fully managed for you. It's very high performance. At the same time, it's horizontally scalable. There is really no upper limit to it. Since a search engine is usually a NoSQL database, it's automatically scalable out of the box. And since Azure is a really good cloud offering, that is something that we don't even have to worry about anymore.
It also comes with administration using the Management Portal, and it also comes with an API that could be used for billing and a lot of other things. At the same time, it comes with querying options. Data import, we could do data import in two different ways. One is using the Data Import Wizard that is part of the Azure Portal. Currently, it only supports Azure SQL Database and then SQL Server relational data on an Azure VM. It also supports Azure Cosmos DB, previously known as DocumentDB.
And it also supports Azure Blob storage, as well as Table storage. And a lot of times, I get this question. "Well, I have a lot of data, "and you know it doesn't really live in Azure, "so how do I even do this?" Now, the second way to do this is programmatically. At the same time, it isn't very hard to import your data into DocumentDB or Cosmos DB, and it supports a lot more options. Cosmos DB even supports MongoDB and a lot of other regular options, like a JSON file, and even SQL Server, which is not on an Azure VM.
And it supports a lot more other data options, like Cassandra and others. So what you could do is use Data Import Tool that comes with Azure Cosmos DB. Azure Search is completely REST space, so it has a REST API. At the same time, if you are a C# developer or a Node.js or Java developer, Microsoft also supports client libraries that you can use, that way you don't have to compose REST API queries in your code.
It comes with API keys for security. There are two kinds of keys. One is the admin keys, which is a primary and a secondary key, and they have the power to do anything. You can create an index, you can delete it, you can update it, as well, read it. However, you also have query APIs that only give you read-only options to query your search, which is really cool. Coming from a background of working with a lot of different search engines, including Lucene, Elasticsearch, Solr, and even FAST, you would notice that Azure Search has done a great job simplifying the API for us.
It's literally geared towards people who may not have any background whatsoever in information retrieval and are still able to use the benefits of an actual search engine in their application. It does not really require you to know the basics of information retrieval, and it's a lot, lot, lot easier. Now, if you are a very advanced search engine person, like me, you may actually not like it when you come in. However, if you see the business value that it creates, you're going to start liking it quite a bit.
So the benefits are, since it's tightly integrated in Azure, it's easy to use on Azure. It's very easy to set it up, and then it's scalable out of the box. And some of the downsides are that it does require a schema. Now, when I looked at it the first time, I was kind of amazed that it required a schema. But if you actually notice, most of the times, search engines do want you to use a mapping. And when you get into doing some complex stuff, it makes more sense to have a schema mapped to your index.
Now, in this case, it is more like a required thing, not an optional thing. It does not support complex data types currently. So if you have a lot of nested objects, one way to make it work with Azure Search is going to be flattening those objects, which is doable. And then the query syntax is quite reduced. If you are coming from an actual search engine background, you may notice that you're not getting the power that you're used to sometimes.
But for the most part, with whatever we need, for most of the enterprise applications out there, Azure Search is a very good offering.
- Querying and indexing
- Creating a search service
- Using APIs during searching
- Importing JSON data
- Handling synonyms
- Working with suggestors and facets