943,696 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 735
  • C++ RSS
May 8th, 2009
0

Search engine

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pockets88 is offline Offline
1 posts
since May 2009
May 8th, 2009
0

Re: Search engine

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.
Reputation Points: 392
Solved Threads: 108
Posting Shark
Alex Edwards is offline Offline
971 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Error linking C object file to C++
Next Thread in C++ Forum Timeline: Reading in a text file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC