I started working with PHP six months ago. I used to read many articles in Internet that gave
me better understanding on PHP. I started developing software for Online Journals that has
the capability of searching documents contents. You can find articles in devarticles.com that
can perform keyword title and author search. This article gives you a brief idea of
What is Document Search?
In a Dynamic Document Search every word in the document is parsed (read) and matched with the search words.
Results are displayed based on the matches found.
Reading every word of the article matching it with the search word over thousands or even lakhs of documents is very
difficult task. Also by default, PHP is configured to run maximum 30 seconds.
To understand this article, you should have a fair knowledge of PHP. To run examples given in your machine,
you need APACHE, PHP,
and MYSQL software installed and configured. I used PHP Version 4.3.1 and MYSQL 2.2.3.
The database consists of three tables. viz. Content Table, Keyword Table, Link Table. Content table holds articles
title, and abstract. Keyword table holds keyword. Keyword field is indexed. Link table holds keyword id, content id.
The SQL Statement for creating these three tables are shown below.
CREATE TABLE content (
contid mediumint(9) NOT NULL auto_increment,
PRIMARY KEY (contid) ) TYPE=MyISAM;