Skip to main content.
home | support | download

Back to List Archive

Re: 'Missing Title' with swishtitle property

From: Bill Moseley <moseley(at)>
Date: Thu May 26 2005 - 04:56:30 GMT
On Wed, May 25, 2005 at 09:41:03PM -0700, Philip Young wrote:
> Hey,


> I am currently in the process of configuring search.cgi and
> to display results.  Indexing of the documents is no problem but I am
> experiencing problems displaying 'swishtitle' within the search
> results.  At the moment the results are displaying "Missing Title"
> which can be seen in the code below.  Therefore for some
> reason the 'swishtitle' property is not populated.

Probably because you don't have a <title>.

> <cut - extract from>
> <a href="[% item.Property('swishdocpath') | uri | html %]">
> [%  item.Property('swishtitle') || 'missing title' |
> highlight('swishtitle', item ) %]</a>

How about

 [% item.Property('swishtitle') || item.Property('swishdocpath') || 'mising title' %]

To do it right you might want more logic -- like only highlight if
swishtitle exists.

You might have better luck using SWISH::Filter instead of FileFilter
-- gives you more control of the input to swish from your various file
formats.  More likely to get a title (for example, pdf conversion uses
pdfinfo to extract out a title, if possible).

> </cut>
> P.S - within the swish.conf I would like to concatenate the meta.xml &
> content.xml so that it extracts both of the files contents.
> <cut - extract from swish.conf>
> FileFilterMatch "/usr/bin/unzip" "-p \"%p\" meta.xml" "-p \"%p\"
> content.xml" /\.(sxw|sxc|sxi|odt)$/i

Interesting.  That's doesn't really work because then you have two xml
files, and I don't think the parser is going to like that.

It would be nice to have a nice Openoffice filter.  Anyone doing this?

What do you mean 'front-end' for search.cgi?  The templates?

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:
Received on Wed May 25 21:56:31 2005