Search engine

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2009
Posts: 1
Reputation: pockets88 is an unknown quantity at this point 
Solved Threads: 0
pockets88 pockets88 is offline Offline
Newbie Poster

Search engine

 
0
  #1
May 8th, 2009
i have to create a mini search engine given a directory of 50 documents and a set of sample queries. i need to include the documents in a hash table and search through the documents for the keywords in the queries.. i have no idea where to start... can anyone help me
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 973
Reputation: Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough 
Solved Threads: 107
Alex Edwards's Avatar
Alex Edwards Alex Edwards is offline Offline
Posting Shark

Re: Search engine

 
0
  #2
May 8th, 2009
Have you done any research on Search Engines and how they are structured?

Do you understand the benefits of using a HashTable for this assignment?

I guess a good start would be to create a class for Documents. You can seperate the document into information such as Head info, body info and tail info, or just info if none of these attributes matter for the scope of your assignment.

You can map expected words to a Document reference, and if two documents have a similar search-key, then you can have it such that one key references two Documents (or more than two if more than one document contains a particular key).

The easy way of doing this is by using a Map with query-input as keys and a linked list (or vector, or some other suitable collection type) of documents as values.

You're going to need a lot of space to do this because you have to compute the total possible amount of permutations of words that can occur from all of the documents combined. Then again if the necessary queries are limited then this can be avoided (somewhat).

I'm assuming the assignment doesn't request you to do that much, but consider the possibilities and the necessary data structures to enable easier searching.

In any case, your best bet is just to wiki Search Engines and google the motivation behind search engines and successful data structures used to enable fast look-up.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC