head 1.1;
branch 1.1.1;
access ;
symbols start:1.1.1.1 PAlibDoc:1.1.1;
locks ; strict;
comment @# @;
1.1
date 2005.11.02.08.30.41; author jandujar; state Exp;
branches 1.1.1.1;
next ;
1.1.1.1
date 2005.11.02.08.30.41; author jandujar; state Exp;
branches ;
next ;
desc
@@
1.1
log
@Initial revision
@
text
@
Recherche
\n";
echo "
\n";
$results = array();
$requiredWords = array();
$forbiddenWords = array();
$foundWords = array();
$word=strtok($query," ");
while ($word) // for each word in the search query
{
if (($word{0}=='+')) { $word=substr($word,1); $requiredWords[]=$word; }
if (($word{0}=='-')) { $word=substr($word,1); $forbiddenWords[]=$word; }
if (!in_array($word,$foundWords))
{
$foundWords[]=$word;
search($file,$word,$results);
}
$word=strtok(" ");
}
$docs = array();
combine_results($results,$docs);
// filter out documents with forbidden word or that do not contain
// required words
$filteredDocs = filter_results($docs,$requiredWords,$forbiddenWords);
// sort the results based on rank
$sorted = array();
sort_results($filteredDocs,$sorted);
// report results to the user
report_results($sorted);
fclose($file);
}
main();
?>
Généré le Fri Oct 28 23:18:15 2005 pour PA_lib par
1.3.9.1
@
1.1.1.1
log
@Initial import of PalibDoc, begin on PAlib0.64b
@
text
@@