Confluent | Onsite | Search Phrase in Document
Anonymous User
8991

You are given a list of documents with id and text.
Eg :-
DocId, Text
1, "Cloud computing is the on-demand availability of computer system resources."
2, "One integrated service for metrics uptime cloud monitoring dashboards and alerts reduces time spent navigating between systems."
3, "Monitor entire cloud infrastructure, whether in the cloud computing is or in virtualized data centers."

Search a given phrase in all the documents in a efficient manner. Assume that you have more than 1 million docs.
Eg :-
search("cloud") >> This should output [1,2,3]
search("cloud monitoring") >> This should output [2]
search("Cloud computing is") >> This should output [1,3]

Comments (15)