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.
Roedy Green - 06 Jul 2007 15:23 GMT
>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.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Manish Pandit - 06 Jul 2007 18:40 GMT
> I'm working on my class project. I'm using Netbeans IDE 5.5 with
> Visual Web Pack and MySQL as its database.
[quoted text clipped - 9 lines]
>
> 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
reexana - 07 Jul 2007 05:43 GMT
Thank you for the suggestions.
I'll try to work it out!!
Thank you.
bencoe@gmail.com - 08 Jul 2007 02:12 GMT
> 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.
-----
Ben
http://www.plink-search.com
Jeffrey H. Coffield - 08 Jul 2007 16:59 GMT
> I'm working on my class project. I'm using Netbeans IDE 5.5 with
> Visual Web Pack and MySQL as its database.
[quoted text clipped - 9 lines]
>
> 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