On Thu, Apr 08, 2004 at 08:25:27AM -0700, Phil Matt wrote:
> I have indexed a site and successfully run Swish-e searches, using John Millard's basic
> script. Having gone through a lot of the Swish-e documentation, I still cannot figure out
> how to tell Swish-e to return some of the TEXT in the results it has found.
>
> I have added to the config file:
>
> IndexContents HTML* .htm .html .shtml
> StoreDescription HTML <body> 600
You need
StoreDescription HTML* <body> 600
if ( $compiled_with_libxml2 )
HTML* = HTML2;
else
HTML* = HTML;
Now once you have that fixed you can return those 600 bytes using either
-p or -x options to list what properties to show.
moseley@bumby:~$ cat test.html
<html>
<head><title>title</title>
<body>
This is the body of the text
</body>
</html>
moseley@bumby:~$ cat c
DefaultContents HTML*
StoreDescription HTML* <body> 600
moseley@bumby:~$ swish-e -c c -i test.html -v0 -T properties
swishdocpath: 6 ( 9) S: "test.html"
swishtitle: 7 ( 5) S: "title"
swishdocsize: 8 ( 4) N: "87"
swishlastmodified: 9 ( 4) D: "2004-04-08 11:07:24 PDT"
swishdescription:10 ( 28) S: "This is the body of the text"
moseley@bumby:~$ swish-e -w body -p swishdescription
# SWISH format: 2.5.1
# Search words: body
# Removed stopwords:
# Number of hits: 1
# Search time: 0.017 seconds
# Run time: 0.060 seconds
1000 test.html "title" 87 "This is the body of the text"
.
moseley@bumby:~$ swish-e -w body -x 'Title=%t\tDescription=%d\n' -H0
Title=title Description=This is the body of the text
--
Bill Moseley
moseley@hank.org
Received on Thu Apr 8 11:14:18 2004