Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:07,500 --> 00:00:11,010
So how do you actually use an index in elastic search?
2
00:00:11,010 --> 00:00:13,010
Well, there's three ways we can talk about.
3
00:00:13,170 --> 00:00:15,760
One is the RESTful API.
4
00:00:15,780 --> 00:00:21,010
Now if you're not familiar with the concept of rest queries, let me explain it at a very high level.
5
00:00:21,120 --> 00:00:25,870
It's just like how you request a web page from a web server from your web browser on your desktop,
6
00:00:25,950 --> 00:00:29,630
so when you're requesting a web page on your browser like Chrome or whatever you use,
7
00:00:29,730 --> 00:00:34,740
what's happening is that your browser is sending a rest request to a web server somewhere,
8
00:00:34,740 --> 00:00:42,150
and for every rest request it has a verb like get or put or post and some sort of body that specifies
9
00:00:42,180 --> 00:00:43,870
what it is that you want to get back.
10
00:00:44,680 --> 00:00:50,170
So for example, if you're looking for a web page, you would send the rest query for a get verb and then
11
00:00:50,170 --> 00:00:56,360
that get would request a specific U.R.L. that you want to retrieve from that web server. Now elastic
12
00:00:56,360 --> 00:01:01,860
search works exactly the same way, over the same HDP protocol that web servers work across,
13
00:01:01,880 --> 00:01:05,200
so this makes it very easy to talk to a search from different systems.
14
00:01:06,520 --> 00:01:11,050
So for example, if you were searching for something on a elastic search, you would issue a get request
15
00:01:11,050 --> 00:01:16,870
through a REST API over http, and the body of that get request would contain the information about what
16
00:01:16,870 --> 00:01:20,190
it is that you want to retrieve in Json format.
17
00:01:20,290 --> 00:01:25,560
We'll see examples of this later on, but the beautiful thing about this is that if you have a language
18
00:01:25,560 --> 00:01:31,110
or an API or tool or an environment that can handle http requests, just like talking to the Web normally,
19
00:01:31,560 --> 00:01:33,800
then it can also handle elastic search.
20
00:01:33,900 --> 00:01:38,070
You don't need anything beyond that, if you understand how to structure the Json requests for elastic
21
00:01:38,070 --> 00:01:43,560
search than any language that can talk to http, can talk to an elastic search server.
22
00:01:44,070 --> 00:01:48,120
Most of this course is going to focus on doing it that way just so you understand how things work
23
00:01:48,120 --> 00:01:54,050
at a lower level, and what elastic search is capable of under the hood. But you don't always have to do
24
00:01:54,050 --> 00:01:55,360
it the hard way.
25
00:01:55,370 --> 00:02:00,230
If you're accessing elastic search from some application you're writing like a web server or web application,
26
00:02:00,230 --> 00:02:06,320
often there will be a client API that provides a level of abstraction on top of those rest queries.
27
00:02:06,470 --> 00:02:10,400
So instead of trying to figure out; how do I construct the right Jason format for the type of search
28
00:02:10,400 --> 00:02:13,290
that I want, or inserting the kind of data that I want?
29
00:02:13,390 --> 00:02:17,180
There's a lot of client API is out there that can make it easier for you.
30
00:02:17,390 --> 00:02:21,980
They just have specialized API is for searching for things and putting things into the index without
31
00:02:21,980 --> 00:02:26,040
getting into the nitty gritty of constructing the actual request itself.
32
00:02:26,060 --> 00:02:31,910
So whether you're using Python or Ruby or perl or C++ or Java there is an API out there that you can
33
00:02:31,910 --> 00:02:34,490
just use. Now in this course,
34
00:02:34,510 --> 00:02:39,170
we're going to focus on using the RESTful API and not these higher level clients.
35
00:02:39,250 --> 00:02:43,720
I don't want to single out one language as the only language that we used in this course.
36
00:02:43,720 --> 00:02:48,010
If I were to go through this whole course using only the Java client it would be useless to people coding
37
00:02:48,010 --> 00:02:53,530
in JavaScript or Python, for example, but all of the different clients in every language boil down to
38
00:02:53,530 --> 00:02:55,360
rest calls in the end.
39
00:02:55,360 --> 00:03:00,640
So if you understand the underlying http requests that these clients generate, you can understand any
40
00:03:00,640 --> 00:03:06,100
of the client APIs, and you'll be able to move more easily from one language to another too.
41
00:03:06,190 --> 00:03:10,960
So, please don't get upset that I'm not going to teach you how to write Java or any other specific language
42
00:03:10,960 --> 00:03:12,730
to use elastic search.
43
00:03:12,730 --> 00:03:17,680
The lower level information I'm giving you will make it easy to use the Java client API or the API for
44
00:03:17,680 --> 00:03:20,350
any other language.
45
00:03:20,350 --> 00:03:24,700
Finally, there are even higher level tools that can be used for analytics and one that we'll look at in
46
00:03:24,730 --> 00:03:26,380
this course is called Kibana,
47
00:03:27,130 --> 00:03:32,590
it's part of the larger elastic stack and that is a web based graphical UI that allows you to interact
48
00:03:32,590 --> 00:03:36,800
with your indices and explore them without writing any code at all.
49
00:03:36,880 --> 00:03:41,800
So it's really more of a visual analysis tool that you can unleash upon pretty much anyone in your organization.
50
00:03:43,030 --> 00:03:47,380
So in order of low level the higher level API, there are restful queries so you can issue from whatever
51
00:03:47,380 --> 00:03:52,840
language you want, you can use client API as to make things a little bit easier, or you can just use web
52
00:03:52,840 --> 00:03:57,930
based UI to get the information you need as well. So those are the basic concepts of how elastic search
53
00:03:57,930 --> 00:04:00,030
is structured and how you interface with it.
54
00:04:00,210 --> 00:04:04,050
With that under our belt, we can talk more about how it works under the hood and how its architecture
55
00:04:04,050 --> 00:04:04,560
works.
6483
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.