Skip to main content.
home | support | download

Back to List Archive

Re: 'Missing Title' with swishtitle property

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

Howdy!

> I am currently in the process of configuring search.cgi and search.tt
> 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 search.tt code below.  Therefore for some
> reason the 'swishtitle' property is not populated.

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

> <cut - extract from search.tt>
> <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
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs
   swish-e@sunsite.berkeley.edu
Received on Wed May 25 21:56:31 2005