WEBVTT

00:00.440 --> 00:07.120
How everyone in this video I will show you one.

00:07.120 --> 00:21.040
More features will be the boss reactions okay and social media application will be have a reaction into

00:21.080 --> 00:23.000
specific posts.

00:23.040 --> 00:23.520
Right?

00:24.120 --> 00:27.680
Let's see how we can design the collection.

00:28.800 --> 00:29.280
Well.

00:30.240 --> 00:38.480
For example in later we have some boss like alter contents okay.

00:38.480 --> 00:40.200
And some properties over here.

00:42.240 --> 00:50.480
And how we can resize the document for the boss reaction, for example.

00:50.520 --> 00:54.760
Like that I will have a reaction with the array inside the array.

00:54.760 --> 01:00.470
Right here we will have a user id okay for first of all, I like that.

01:03.350 --> 01:03.950
And.

01:06.070 --> 01:10.990
You know the high possible line over here.

01:12.350 --> 01:12.710
Oh.

01:16.870 --> 01:17.470
Wow.

01:17.830 --> 01:18.390
Okay.

01:18.430 --> 01:18.790
Or.

01:19.270 --> 01:19.910
Haha.

01:20.550 --> 01:21.830
Okay, something like that.

01:23.190 --> 01:23.710
Okay.

01:24.350 --> 01:28.030
We can we use the regression line.

01:28.070 --> 01:28.870
That's one.

01:29.790 --> 01:32.750
But you can turn this good or not.

01:33.550 --> 01:42.350
Well for example it later with this post over here we have a 1 million reactions.

01:42.870 --> 01:53.510
It means inside the reaction over here we will duplicate, uh, we will have so many document in the

01:53.510 --> 01:54.350
reactions.

01:54.390 --> 01:54.950
Right.

01:56.990 --> 01:58.580
It may be Eliza.

01:58.620 --> 02:00.700
We will grow the reaction.

02:00.740 --> 02:01.220
Alright.

02:01.220 --> 02:03.180
Right here is very big.

02:06.300 --> 02:09.100
And that's clearly not good at all.

02:09.660 --> 02:10.220
Right.

02:10.980 --> 02:13.860
So for that reason with the reaction.

02:15.900 --> 02:19.300
We will not do that.

02:21.220 --> 02:22.100
We split up.

02:22.100 --> 02:26.300
We will separate it into another document.

02:27.580 --> 02:31.060
First of all I reaction over here okay.

02:33.020 --> 02:38.540
With the reaction over here we will have a boss ID right.

02:42.980 --> 02:45.660
Possible like one okay.

02:45.660 --> 02:49.740
We will refer to this part and we will have a user.

02:50.220 --> 02:50.580
Okay.

02:50.620 --> 02:54.340
First of all I use a tool okay.

02:54.380 --> 03:02.900
Use a tool reaction was one with a high grade like, okay, something like that.

03:03.140 --> 03:04.300
We will use.

03:08.500 --> 03:11.500
We will use in the narrative.

03:11.860 --> 03:15.260
Let us at least very good.

03:15.300 --> 03:15.780
Right.

03:18.020 --> 03:25.780
And right here we also have one more problem which is in lighter.

03:26.980 --> 03:30.060
If I want to know the boss right here.

03:30.100 --> 03:30.540
How?

03:30.780 --> 03:34.820
Uh, so some reaction counts.

03:35.300 --> 03:42.900
For example, how many, like, belong to the boss or how many wow into the boss?

03:43.380 --> 03:44.340
Or how many?

03:45.260 --> 03:47.940
Haha into this boss right here.

03:49.740 --> 03:51.660
Well, how do I know that?

03:52.100 --> 03:55.410
Well, we need to do some aggregation.

03:59.530 --> 04:06.010
And aggregation right here is also it has some limitation.

04:08.170 --> 04:10.050
It means the aggregation.

04:10.570 --> 04:15.290
This is for it has a little bit of performance issue.

04:15.810 --> 04:17.810
It's not good for performance.

04:18.210 --> 04:26.890
So for that reason inside the box right here we can create the sum calculation field directly over here.

04:27.650 --> 04:27.970
Right.

04:27.970 --> 04:34.970
We actually have something like that we will create the circular loss will be for example like.

04:42.770 --> 04:43.330
All right.

04:43.330 --> 04:54.320
We will create a loss whenever a user reaction we need to create the reaction into the reaction document.

04:54.800 --> 04:55.160
Okay.

04:55.200 --> 04:57.720
We will add a reaction document.

04:57.960 --> 05:01.480
And we also update the filter here into the box.

05:02.280 --> 05:02.760
Okay.

05:03.200 --> 05:04.720
It means insert the box right here.

05:04.720 --> 05:12.080
We can provide one more thing one more field for reaction count.

05:13.000 --> 05:22.440
And in later when we get our box we just need to get this.

05:22.480 --> 05:30.040
And you will see we will have so many thing reaction over here.

05:30.080 --> 05:30.400
Okay.

05:30.440 --> 05:35.880
We don't need to do some complex queries or something like that.

05:35.920 --> 05:36.360
Okay.

05:36.400 --> 05:41.600
That's the strategy right now and I hope you understand this video.

05:41.960 --> 05:48.040
In the next video, let's step by step and build the reaction and provide one more thing.

05:48.480 --> 05:50.400
So I will see you in the next one.
