Skip to main content.
home | support | download

Back to List Archive

'Missing Title' with swishtitle property

From: Philip Young <philipishere(at)>
Date: Thu May 26 2005 - 04:43:12 GMT

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.

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

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
IndexContents XML* .sxw .sxc .sxi .odt
StoreDescription XML* <text:p>
Would the above code be appropriate is there another way to approach this?
Could anyone point me to some tutorials on configuring and displaying
the 'front-end' of search.cgi.


Philip Young
Swish-E 2.4.3

This is the config that is within my search.cgi:
%config = (
    INCLUDE_PATH => [ '/usr/share/swish-e/templates' ],       # template path
    index        => '/var/www/test/index.swish-e',             # path
to index file
    page_size    => 15,                          # number of results/page
    title        => 'BlueCMS',
    template     => '',
    prop_to_meta => {
        swishdescription => [ qw/ swishdefault / ],
        swishtitle => [ qw/ swishdefault swishtitle / ],

This is my swish-config (swish.conf):

IndexDir	/var/www/test
IndexFile	/var/www/test/index.swish-e
IndexName	Documents
IndexOnly	.xml .htm .html .txt .doc .rtf .sxw .sxc .sxi .odt 
DefaultContents	TXT
SwishProgParameters -S fs

ReplaceRules replace /var/www/test /test
ExtractPath subject regex !^/test/([^/]+)/.*$!$1!

# Allow extra searching by title, path
metanames swishtitle swishdocpath
UndefinedMetaTags auto

IndexContents TXT* .pdf
FileFilter .pdf "/usr/bin/pdftotext" "'%p' -"

IndexContents TXT* .doc
FileFilter .doc "/usr/bin/catdoc" "-s8859-1 -d8859-1 '%p'"

IndexContents TXT* .rtf
FileFilter .doc "/usr/bin/catdoc" "'%p'"

FileFilterMatch "/usr/bin/unzip" "-p \"%p\" meta.xml" /\.(sxw|sxc|sxi|odt)$/i
IndexContents XML* .sxw .sxc .sxi .odt
StoreDescription XML* <text:p>

FileFilterMatch "/usr/bin/unzip" "-p \"%p\" content.xml" /\.(sxw|sxc|sxi|odt)$/i
IndexContents XML* .sxw .sxc .sxi .odt
StoreDescription XML* <text:p>
Received on Wed May 25 21:43:14 2005