1. INSTALLING / SETTING UP
NOTE: you will need to add the path to the
search/ directory to your php_include_path
or else do a lot of hacking to have all the
files found!
You should have the following files:
* chmod.sh - shell script to help
set up some permissions
* stopwords.php - list of words you don't
want to index or search
* class.searchengine.php - main class
* config.php - configuration directive.
EDIT THIS! You will need to
edit the paths of directorys
and the unix program "sort"
(use 'which sort' to find path)
* README - this file
* class.timer.php - class to time searches
written by David Sklar
<
sklar@student.net>
* filesystem.example - an example of how to index files
on your hard drive.
* search.db - example db for indexing, testing.
There are 27 jokes, some funny, some
not. First create the database search,
then import this file. You might need
root privileges.
prompt$> mysqladmin create search
prompt$> mysql -pyourpasswd search < search.db
* index.php - sample indexing script using provided
jokes database. You need to be able
to use PHP from the command line to
run it (or modify it to work with your
web server). Edit about line 11 to
your database username and password.
* search.php - test search script from command line
You need to have the cgi version of
php to run it. See the www/ directory
for samples of searching via a web
page.
And these directories
data/ - where the data lives
tmp/ - used for indexing/merging
(temporary files)
www/ - sample search form and
results page using provided
jokes database. Copy these into
your web server htdocs in a place
you can test them.