How to create a program like search engine

R

reexana

I'm working on my class project. I'm using Netbeans IDE 5.5 with
Visual Web Pack and MySQL as its database.

I managed to display the information in the database when a user
selected the keyword from the list box.

The question is how to display the information stored in the database
by using a keyword entered by a user in a textbox?
The concept is similar to building a search engine.

Anyone please help me.

Thank you in advance.
 
R

Roedy Green

The question is how to display the information stored in the database
by using a keyword entered by a user in a textbox?
The concept is similar to building a search engine.

Text search takes advantage of the fact there are relatively few words
in English. You can enumerate the words, and enumerate the documents
assigning each an integer.

Then for each word you have a list of document numbers sorted in order
by the number of hits of that word in the document.

To find documents containing two words, you read the list for the two
words looking for duplicates discarding everything else. So you can
pull this off with two physical reads, and none if the words are
common ones cached in RAM.


You could do this is a clumsy way by having millions of SQL records of
the form word, document, count, probably converting word and document
to a dense int first.
 
M

Manish Pandit

I'm working on my class project. I'm using Netbeans IDE 5.5 with
Visual Web Pack and MySQL as its database.

I managed to display the information in the database when a user
selected the keyword from the list box.

The question is how to display the information stored in the database
by using a keyword entered by a user in a textbox?
The concept is similar to building a search engine.

Anyone please help me.

Thank you in advance.

If you want to create a search engine matching capabilities of the
real world ones, you can look at lucene (lucene.apache.org) and use
its API to index the database content. It is pretty straightforward to
use, and should get you a very good search engine. However, you'd have
to reindex every time the db content changes.

If the goal is to actually create a search engine, you'd have to read
up on indexing and related algorithms.

-cheers,
Manish
 
B

bencoe

Thank you for the suggestions.

I'll try to work it out!!

Thank you.

Let me know what approach you decide to take, natural language
processing is my research area.. so I can probably give you some
useful tips if you decide to undertake making your own search
engine... I'll keep quite for now though, don't want to bore you too
much.
 
J

Jeffrey H. Coffield

reexana said:
I'm working on my class project. I'm using Netbeans IDE 5.5 with
Visual Web Pack and MySQL as its database.

I managed to display the information in the database when a user
selected the keyword from the list box.

The question is how to display the information stored in the database
by using a keyword entered by a user in a textbox?
The concept is similar to building a search engine.

Anyone please help me.

Thank you in advance.
Since you are using MySQL, look at this:

http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

Jeff Coffield
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top