Skip to main content.
home | support | download

Back to List Archive

multiple instances of a property

From: David Hoare <dh2(at)>
Date: Tue Nov 29 2005 - 14:56:03 GMT

Firstly, thanks again for an excellent program. Secondly sorry if this has 
already been asked before.

Some background may help. Our documents contain multiple DC.creator meta 
names. I have indexed and searched on these successfully. I am using the 
very nice swish.cgi program for searching and displaying results.

I want to use DC.creator meta tag as a property (metaname) to display in 
the search results page. As part of the display I want to make each of the 
DC.creator values from a document hyperlinked (to the search program) so a 
searcher can find more documents by that creator with one click.

At the moment all the DC.creators are being displayed as one string.

So to clarify; for the document A.html in the header we have

<meta name="DC.creator" content="Smith A." />
<meta name="DC.creator" content="Jones B." />

What I want for a search which returns a hit on A.html is something like

<a href="swish.cgi?query="DC.creator=%2DSmith%20A.%2D">Smith A</a> and <a 
href="swish.cgi?query="DC.creator=%2DJones%20B.%2D">Jones B</a>

displayed, but what I am getting is more

<a href="swish.cgi?query="DC.creator=%2DSmith%20A.%20Jones%20B.%2D">Smith 
A Jones B.</a>

I can see that the code in the swish.cgi for obtaining these values:

         for my $prop ( @props ) {
             # Note, we use ResultPropertyStr instead since this is a general purpose
             # script (it converts dates to a string, for example).
             # $result->Property is a faster method and does not convert dates and numbers to strings.
             #my $value = $result->Property( $prop );
             my $value = $result->ResultPropertyStr( $prop );
             next unless $value;  # ??
             $props{$prop} = $value;

but I am not sure how this needs to be changed to get what I want.

Any pointers in the right direction gratefully recieved.


Received on Tue Nov 29 06:56:10 2005