Working with Map Data Structure
Understanding Search Engines and How They Work
In this project, I have simulated a search engine using the map data structure. I have designed my program to read a number of documents and construct an inverted index from them. Then, it takes a word as input from the user and displays the names of the documents that contain that word. Note that this search engine can accept three types of inputs from the user:
- Words that must be present in the result. These words have no prefix.
- Words where at least one of them must be present in the result. These words are prefixed with a +.
- Words that should not be present in the result. These words are prefixed with a -.