System Design - Keyword Search w/o ElasticSearch Flashcards

1
Q

You want to get into a pattern of identifying bottlenecks in the system and then optimizing. The more rapidly you’re able to do this, the deeper you’ll get into the problem.

A

Keep going. You got this!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Quick estimations can help you focus on the most critical aspects of the system and avoid spending time on less important areas. They can also help you identify and solve bottlenecks more effectively.

A

=)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Create a Reverse Index

A

Keyword -> post IDs
need to update this when someone creates a post

have a cache of the keyword -> post_ids

Use Redis for the keyword -> posts.
You can have 2 data structures.
A list for the most recent posts. And keep appending to it.
Use a sorted set for the Likes.
Possibly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Create

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly