>> Learn how to make your data searchable with Azure Search and
AI in this episode of Azure Tips and Tricks.
Creating compelling search experiences is hard.
Azure Search provides search as a service and makes it easy to let
AI analyze your data and enhance your results. Let's try it out.
I'll start by creating a new Azure search instance.
There we go. Let's create it.
I'll pick an existing resource group and I'll give it a name.
This will be the URL of the search service.
I will also pick a location. That's it.
Next, here I can scale
the service with more replicas and partitions.
I'll leave this for now.
Okay, this is fine and let's create, there it goes.
I'll skip to when it is done.
Here is the Azure Search instance.
It doesn't do anything yet because it doesn't have any indexes.
Let's create one by clicking "Import data".
Here, I can pick a data source to connect to.
I'll use a sample dataset that
contains real estate data from the US.
Next, here I can use AI to enhance the search results.
First, I need to link an Azure Cognitive service.
I don't have one yet so let's create one.
Here we go. I'll give it a name like this.
Now, I need to pick a location,
and a pricing tier,
and also a resource group.
Finally, I need to tick this box and "Create".
There it goes. Now, let's go back and hit "Refresh" and select it.
So now, I can create a skillset that enhances my search results.
I will target the description field of the data
and I will choose sentences for the granularity level.
I do this because the description will contain more than 5,000
characters which is the processing limit
for some of the AI skills.
Let's pick extract key phrases and translate text
and let's translate to Afrikaans and also the text sentiment.
Next, here I can customize the index.
I can indicate which fields can be searched,
sorted, filtered, and so on.
I'll leave this as is.
Next, this is the indexer that will create and maintain the index.
This is fine. Let's submit it.
Now, it starts creating the index.
This will take a while so I'll skip ahead. It is done.
It took 24 minutes to create this index and that's
because I chose to cut the data into sentences.
In production, this won't impact your availability
because you would be running multiple replicas of the index.
Let's take a look in the search explorer. Here we go.
In here, we can start searching like this.
The result is JSON content and contains all the data
that we need including the AI enhanced data.
It identified key phrases in the data
and it translated the description into Afrikaans.
It also analyzed the sentiment of the sentences which
is very positive and what we expect in a real estate listing.
You can now use the search index through an Azure Search SDK
like a.Net SDK or by calling the REST API directly from your app.
You can also generate a UI with this website.
This is a preview tool that will be
incorporated into the Azure portal in the future.
Just fill in the Azure search key,
which is this one here,
into the field in the website
here and go back to the search index in
the Azure portal like this and
change the course setting to allow all origins.
This will give the UI access to the search index.
Get the JSON definition of the index and copy
that and we need to paste that in here.
Finally, put in the name of
the Azure Search instance and generate the app.
This generates an HTML file that uses the search index. Cool, right?
It uses auto-complete and other things that you
expect like filters and sliders.
You can tweak the file to be more
appealing like in this sample application.
This truly makes Azure Search
a Search as a Service including the UI.
Go and check it out.