Skip to main content.
home | support | download

Back to List Archive

how do i get the description to print online

From: Wolf, Dena <dena.wolf(at)>
Date: Mon Dec 02 2002 - 18:15:31 GMT
Thanks for all your prior help!!
Ok, the new version of swish is now working on our solaris server thanks to
my isp.  Now I have but 1 ONE question left (i hope).  
I have read thru the help docs and can't find an answer to this .. please
don't send me back to the command line help, as it isn't helping..

I have the storedescription directive in my config file.
when i run my command line with -t properties, i can see that the store
description is working.
i.e. stratdom.html - Using HTML parser -  (345 words)
          swishdocpath: 6 ( 26) S: "service/comp/stratdom.html"
            swishtitle: 7 ( 25) S: "ORC Compensation Services"
          swishdocsize: 8 (  4) N: "0000000014872"
     swishlastmodified: 9 (  4) D: "2002-11-05 16:22:36"
      swishdescription:10 (2505) S: " When a mid-sized co
mpany acquired another of equal size, it found substantial differences in
pay philosophy, actual pay levels, and
in both the type and cost of employee benefits..."

ok great.

Now, what do I do to my swish.cgi file so that this description prints out
in folks webbrowsers when they search.  Can you give me a very layperson
answer on this one.  Here is the relevant part of my cgi file (I think):

sub search_parse
# Run SWISH and parse output
#Initialize counter variable for number of results
$count = 0;
open(SWISH, "$swish -w $query -m $results $search_tags -f $index |");
while (<SWISH>)
  # First, check to see if search produced an error

   if ($_ eq "err: no results")
   {&search_error("There were no items that matched your search request");}

   if ($_ eq "err: could not open index file")
   {&search_error("Could not open SWISH Index File $index");}

   if ($_ eq "err: no search words specified")
   {&search_error("Please Enter at least one Search Word");}

   if ($_ eq "err: a word is too common")
 {&search_error("One of your search terms is too common, please try

# Next Line ignores lines that begin with a non-digit
  next if /^\D/;
  push(@results, $_);

&html_header("Your Search Results");
    print "The following items were found that might be relevant to your\n";
    print "search topic.  A higher relevancy score means the item is
    print " likely to be what you are looking for.<p>\n";
    print "Your Search for <strong>$query</strong>, returned $count
    print "<hr><dl><dt>\n";
foreach (@results)

 ($stringone, $title, $filesize) = split(/\"/, $_);
 ($rank, $url) = split(/ /, $stringone);
 print "<dd><a href=\"$url_prepend$url\">$title</a> -  <br>\n";
 print "<dd>Relevancy Score: $rank  Size of Document: $filesize Bytes<p>\n";
print "</dl><P>\n";

very best,
Received on Mon Dec 2 18:17:08 2002