System Overview - Search functionality design
This system allows users to search for information quickly and accurately. It must handle many users at once and return results fast, even when the data is large and frequently updated.
Jump into concepts and practice - no test required
This system allows users to search for information quickly and accurately. It must handle many users at once and return results fast, even when the data is large and frequently updated.
User | v Load Balancer | v API Gateway | v Search Service <-> Cache | v Search Index | v Primary Database
index = {}
keywords = ['apple', 'banana', 'apple']
docs = [1, 2, 3]
for i in range(len(keywords)):
index[keywords[i]] = docs[i]
print(index)
What is the bug in this code?