← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Design and implement a simple search indexing engine that supports three types of queries on a collection of text documents. The engine must provide methods to add documents to the index and then search by (1) a single word, (2) multiple words (AND semantics – return only documents that contain every word), and (3) an entire sentence (order-sensitive substring match). All comparisons should be case-insensitive. Internally you should build an inverted index that maps each word to the set of document IDs that contain it, and keep the original lower-cased text of every document so sentence searches can be performed with a simple substring check.