>> Hey, friends. Did you know that Azure Search
handles billions of search queries every month?
Jacob is here to show us how you can add
the AI-powered Cloud Search Service to
your mobile and web apps without hiring
search experts that know what an inverted index is.
I'm going to learn how today on Azure Friday.
[MUSIC]
Hey, folks. It's another episode of Azure Friday.
I'm here with Jacob talking about Azure Search.
You've got a couple of cool features and demos to show me today.
>> Yes, I am.
So first, maybe a little intro what Azure Search is.
>> Please.
>> It's not a search in an Azure Cloud.
It's search on your data.
So you bring your data, you want make it searchable.
You have a website, you want to add this small search text box.
These days, people are used to great search experiences.
Like if you type a word,
then it will not find something that you meant.
They're like, "Oh, this search is not good."
So today, I want to show you what Azure Search can do for you.
My screen is already here.
So like as usually, you start in Azure Portal.
Azure Search is one of the search services.
The first question probably you have,
like how do I bring my data to Azure Search?
Do I have to bring my data to Azure Search?
The answer is yes, because you need to make it searchable.
You need to create a search index.
Search index is something like a SQL table.
So for example, there are two ways to do it.
First is you can directly upload it to search index,
or if you have SQL Database or Cosmos DB or Blob Storage,
we can import it for you and keep it in sync for you.
So you can still keep your data in SQL Database,
and then we can sync it and have it searchable in a search index.
So here in the Azure Portal,
and I created a Azure Friday search resource service.
For example, if you click "Import data",
we have this sample data search which is
real estate data on SQL Database,
and I click "Next".
Now, we are trying to find out what do you have in your data.
I will keep the cognitive search for now and then I'll get
to the search index, what that is.
So as you can see here,
it looks like a simple table.
So we have "beds", "baths".
This is like a [inaudible] yes, string.
You can change it. You can
change the properties, so on and so forth.
>> Yeah.
>> Then once you're done,
because I already went through this exercise,
you end up in the search index that you can pretty much search.
So for example, let's say I searched for "Medina".
I went off to find some house in Medina
where Bill Gates and Jeff Bezos live.
So here, we have our old JSON.
But we also created open-source tool that
enables you to generate UI on top of this data.
So if you go to GitHub and search for AzSearch.js,
we have this library there.
You can take advantage of that.
We have a website that will generate UI for you,
not much to do on your site,
and you end up with something like that.
So then, when I search for Medina here,
I can see the beautiful houses over there. But then, let's see.
I don't have $4.5 million yet,
so I want an apartment.
So show me apartments, 2.5,
but let's be more humble.
Two beds, I found this Medina, 600K, cool.
So this is like a one-on-one search experience you
want on your site that is efficient, it's fast.
But you can also do more cool things.
So a few months back
when the US Government published the JFK files.
>> Oh, yeah, I remember that. They were huge.
A big dump of data that they had on what's it called?
They made it not confidential.
>> Yes. That was most like images and PDFs.
>> Yeah.
>> It's a problem to go through all of it and
try to find some information.
>> Pretty hard.
>> But we were like, "Hey,
why we don't put it on Azure Search?" That's what we did.
>> Really?
>> So we created this website, JFK Files.
You can go there, jfkfiles2.azurewebsites.net.
So you can guess that it's JFK.
>> That's a pretty cool idea. Yes, someone else's
JFK Files 1 is out there somewhere.
But that's cool. What a clever idea.
>> Then you can start your research,
like what can you find through it.
>> But hang on though, you said it was blobs and images and that's
a big binary dump of stuff. How can you search those stuff?
>> So that's when the Azure Search comes in,
because our goal is not only to make textual data searchable,
but also enabled you to bring any types of data.
So we have this GitHub account where we show the architecture
of JFK files when we put everything in Azure Storage,
then we did our mechanism to extract this content from images,
do OCR on them.
I'll do text analytics,
use AI, powered by cognitive services.
So now, we did that and create
the search index and then generated this site
using AzSearch and did
some polish on top of that. Then you can start your research.
So for example, if I search for "Oswald"
which is the assassin of JFK,
it outputs these documents.
Also, we added a cool highlighting on top of that,
so you can see like, "Oh, Oswald was mentioned here."
>> How did you look at that scribble though?
>> That's how good the Microsoft OCR is.
>> Seriously.
>> This is recognizing the handwriting.
Yeah, and also it's recognizing people in the images.
So for example, there is an image of
Oswald and it tagged it properly.
>> Wow.
>> Then you can go further.
So we did entity correlations.
So we have here that Lee Harvey Oswald,
do you see like Lee Harvey is correlative to Oswald?
He's actually the same person.
You see, there is this correlation to Duran,
like what is Duran?
Then you probably want to search Duran. Who is Duran?
You can dig in here, so let me switch back to the view.
You see, Sylvia Duran, Duran family.
There was some investigation here.
So you get Duran, Cuban Embassy employee.
So there is a Cuba in here.
Also, we detect different tags,
different mentions that are there.
So pretty much that bring a lot of data,
we make it searchable, you can explore it.
Before recording this episode, I was like,
"Hey Scott, can you share your blog posts with me?"
>> Well, it's funny that you mentioned that because the thing
is I've been working on upgrading my blog.
My blog is actually a 12 or 13-year-old application.
I've got 4,000 or 5,000 XML files.
At the very beginning of this conversation,
you made a comment about how users
have an expectation about how search works.
My search that I wrote in 2002 was effectively string.contains.
No fuzzy search, no clever search, no past tense.
No, it's the state-of-the-art 15 years ago.
In fact, if you look at the pie chart of the amount of
work that my site does,
about 20 percent of it is just search.
I don't want to be in the search business.
So search as a service with
the latest styles and
cognitive services that can be applied to search,
even sentiment analysis, all
kinds of things I'd love to do on my search.
If you can get me out of that,
I could actually refactor via subtraction,
and 20 percent of my blog would just go away and
I just use search as a service, Azure Search.
>> Yeah, exactly. As you mentioned,
you don't want to be in the search business.
That's what the many, many people who want to add search.
>> That's not what my app does.
>> Yeah, exactly. People end up with either contents,
or they just use
some third-party solutions that take them to Bing,
or Google, or whatever.
>> Yeah.
>> But you can do it very easy with Azure Search.
Another important thing is that you don't have to manage it.
It's on Cloud, we give you pretty nice SLA,
we take care of all of the fuzzy searches,
or at a distance when you have misspellings,
we give you auto-complete, we give you suggestions.
All of these things that you have spent months or
years if you want to make it nice, we give you for free.
>> Yeah, but I don't have a week to do that though.
>> Exactly, so you want to start fast,
and you just want to have
a simple search with all these search capabilities.
So what they did with your-
because first I asked you like how it will be
perfect that if it is in a SQL database, right?
>> Yeah. You said, give me the SQL.
No, I don't. I give you 5,000 XML file.
>> Yes, and what I did.
I put your XML files in the Blob storage.
So this is example like how one of the XML files look like, okay?
>> Yeah.
>> It's HTML encoded, coded in XML.
>> Yeah.
>> I was like, okay, I'll just put it in Blob Storage,
and I'll go through this import
data flow that I showed you before, all right?
>> That's cool.
>> I created Hanselman Search Service.
I said import data.
Here I have the Hanselman Blob Storage
and run through this wizard again.
Then this outputs for me, the searchable blog.
I think it's coming to blog 3 because I
also run the people extraction,
and also I think organization and Sentiment Analysis.
For example, here if you search for Satya.
Again, I get the XML extracted data,
which is not that fancy,
but only just to show you like, okay,
these are all the people that I found like Tony Stark,
Satya Nadella, Phil Haack.
>> These are all names you identified.
>> These are mostly like real names.
There are organizations, Microsoft,
YouTube, so on and so forth,
and also like a sentiment.
Here's a small caveat.
Because if you run sentiment on large articles,
you usually get 0.5.
>> Right.
>> Because usually, there is not something
very extreme as you would look at a large set of data.
But if you run it per sentence,
here you have a little bit more interesting thing
like I can remove the 0.5's maybe,
and then see how positive it is.
So it looks like you're talking pretty
positively about Satya here.
>> I'm pretty happy. I'm pretty positive.
I like to be. I say nice things about the boss.
>> I went to this AZSearch generator to
generate a website and then I put it on Azure websites.
This is your blog. I sort of explained.
What can I find on code blogs?
>> How did you generate that?
>> Here on GitHub, we have this tool called AzSearch.js, okay?
>> Okay.
>> Sure, it's like a small website that we host that you can
generate just with your service name, you could require a key.
By the way, we are moving this to Azure portal.
>> Right.
>> So you are able to do it with one button click.
>> Right.
>> You'll get index.html because,
believe it or not, this is just index.html sites.
>> Really?
>> Yeah.
>> Much more, yeah.
>> That's amazing.
>> Very minimal JavaScript.
>> Yeah.
>> If you're interested in how to do this like I wrote
a blog post, cognitive search,
Azure search with AI on my blog and go to JJ09.net,
and here's step-by-step I described like you through info data.
You use the realest samples.
You can use, of course, your data.
At the end, how do you generate this UI with AZSearch?
Because by default, we show you the JSON output.
This is what comes with the search request.
>> All right.
>> But you can super easily provide the HTML template,
which looks, let's say, something like that.
>> That's cool.
>> That's it. You're done, and you have searchable site.
First thing I notice here is that, okay.
>> How long did this take you?
>> This? Less than five minutes maybe.
I think the longest part was uploading your XML.
>> Literally, the longest part was waiting for it to upload?
>> Yeah. You literally go through it,
and you can do it in a minute or two,
then it sinks, and then you have that.
I spent some time in finding your image,
see now Scott Hansleman.
That stuff took the longest.
But the role site I have pretty quickly.
Here I see people. Carl Franklin.
Yeah, I know this guy. You did
like Hanselminutes with him at the beginning.
But I was also like, who is Travis Illig?
>> Oh, I worked with him at an organization.
He's a very talented engineer.
>> Yeah, and that's what I found here.
>> Yeah, we haven't worked together in 10 years,
but early on, he was doing so much amazing stuff.
I would write about him all the time.
That's an insight I never would have seen if I hadn't
applied Azure Search to 20 years of content.
>> Exactly. Because this blog was actually from 2004.
>> Can you do search for diabetes.
>> Sure.
>> Look at that. it's already auto completing.
>> I probably did some diabetes.services.
>> Yeah, there's the insulin pump, and you found it right away.
>> Look at this. I literally didn't do anything with your XML's.
I let the Azure Search machine to extract all of this,
and this is the raw content that we
have in the search index right now.
It's nicely parsing the images, right?
>> Yeah.
>> If you search for different things
like ASP.NET, because that's,
and you have tutorials,
server controls, just net, ASP.NET core maybe.
>> That's amazing.
>> Oh yeah.
>> Giraffe.
>> Called giraffe. How cool is that?
So all of this is for free.
So if you just apply a little bit of
polish on top of that, your blog is ready.
>> What's so funny about that is that,
you in the process of making my blog archives searchable,
have made an even nicer blog than my blog.
That's not even the point of Azure Search.
So if you apply this to your business rules,
and with the data that you have in your SQL Server,
folks who are listening to this right now,
the power that you could find,
the insights that you could find inside of
your existing data is huge.
>> Yes. Exactly. You don't have to use this UI generator.
>> [inaudible] showed the possibilities?
>> Yeah, you can use API directly.
>> Indeed.
>> Yeah. Where's my focus? F12, yeah.
If you want to see now how this works, so for example,
here I click "Search", this is what you get in the return.
So you get these different search results with that search score.
So you can see how precise this is what they found.
You get the highlights. You get the sentiment.
You get the people [inaudible].
>> Full power.
>> Parsing is up to you.
You can do whatever you want.
We have.Net SDK, we can do all JavaScript,
and then we can have the Cognitive services on top of that,
you can analyze images, you can OCR,
then we can detect people, we can detect celebrities.
The possibilities are endless.
>> The possibilities are endless.
Well, thank you so much for sharing those.
I am learning all about the power of Azure Search.
I thought I knew, but I didn't.
There's even more there than you can
imagine today on Azure Friday.
[MUSIC]