Skip to main content.
home | support | download

Back to List Archive

Re: Storing Descriptions of html files

From: <moseley(at)>
Date: Fri May 23 2003 - 07:56:17 GMT
On Fri, May 23, 2003 at 12:09:36AM -0700, Timo Haberkern wrote:
> #IndexContents XML* .ml .sxw .sxc .sxg
> StoreDescription XML* <text:p> 320
> StoreDescription HTML <body> 320
> StoreDescription TXT 320

> My problem is that no description is shown in the searchresult even if i 
> use the -p swishdescription argument.

This is a common source of confusion (and probably doesn't need to be).

You have to say:

IndexContents HTML* .html .htm

or say

DefaultContents HTML*

then StoreDescription HTML* <body> 1000

(Remember HTML* == HTML2 if libxml2 is installed, otherwise HTML* == HTML.)

The reason (which is not a good reason) is that StoreDescription is set for
a document type (parser, really).  But you have to use DefaultContents or
IndexContents to assign a type to a file.

In other words, without DefaultContents or IndexContents there is no type
assigned to the file.  Swish still indexes the file (and defaults to using
the HTML* parser), but since there is no type assigned to the file none of
the StoreDescription types match.

Life would be easier if swish-e used content-types instead of HTML*.  Use 
mime.types to map file extensions to mime types.  Then base filter 
selection, parsers, etc. on the mime types.

Bill Moseley
Received on Fri May 23 07:56:22 2003