Setup a search database

K

Kyle

I am plan to setup a database for searching purpose. The
database will contain a lot of knowledge base collect from
user overtime. I want to setup a search database form
which allow the user to type in question then click search
to search for the article. This will similar to the search
button on any webpage on the net. I wonder how do I setup
the database so that it will looking for the keywords when
the user enter the question. Example, the user enter
"unable to communication with CPU; communication & CPU
would be the keywords for the search. The search will
return a list of article from the collection database.

Anyone have any sample or website refers to for me to read
about would be appreciated.
 
T

TC

As a broad guide, this is what I would do.

Create a table for the articles:

tblArticle
ArticleNo (PK) (autonumber)
Content (memo field)
author, date entered, whatever

Then a table to index every word in an article title or body:

tblXref
XrefNo (PK) (autonumber)
Word
ArticleNo

So if the word "database" occurred twice in article 1's title, and 6 times
XrefNo Word ArticleNo
(whatever) database 1
(whatever) database 5

Then if the user entered a search for "database", you would know that word
occurred in articles 1 & 5 - and only those articles.

Enhancements might include:
- recording whether the word appeared in the title, the content or both;
- searching with conditions (AND, OR etc.)
- searching for phrases
- index external .doc files etc.

A simple method (as outlined above) would be fairly easy to code. You'd just
need a form to allow for entry, edit & deletion of articles. The form would
run some code to extract the title & content words & update tblXref
accordingly, whenever an article was added, edited or deleted.

The enhancements would be a different story. Phrase searching, for example,
would be way harder than simple word searching.

So you should at least consider using an off-the-shelf product, as opposed
to re-inventing the wheel yourself.

HTH,
TC
 

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

Top