On Wed, May 25, 2005 at 09:41:03PM -0700, Philip Young wrote:
> 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>
[% item.Property('swishtitle') || item.Property('swishdocpath') || 'mising title' %]
To do it right you might want more logic -- like only highlight if
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).
> 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?
Unsubscribe from or help with the swish-e list:
Help with Swish-e:
Received on Wed May 25 21:56:31 2005