Your program should print the inverted map to the screen (using a format similar to the inverter project, but you will print out the url values instead of document IDs). You can print the inverted map by modifying the print method. This output shows that you are spidering and inverting correctly. Apart from being useful for you in debugging your code, getting your code working until this stage properly accounts for 20% of the grade in this project.
Your program should then produce another line of output to the console:
"indexing complete" and then start the server. The rest of the interaction will take place through the web server itself. The user will ask the server for one of two things, a ?le or a query. If it asks for a ?le (either index.html or the image ?le), the server will return it to the client. All other requests for ?les should cause the server to terminate the connection. In response to queries, the web server will return a set of web pages that contain all of the search terms.
Please use this code snippet to output the search results:
sprintf (buf2, "%s %s",
host.c_str(), file.c_str(), host.c_str(), file.c_str());