Skip to main content.
home | support | download

Back to List Archive

Re: Returning Highlighted Text or the META Description

From: <Jeffrey.Grunstein(at)not-real.ny.frb.org>
Date: Mon Jan 06 2003 - 14:26:18 GMT
Not quite.

I want to display swishdescription if the match was found in
swishdescription (the BODY tag in this case).

But if the match was found somewhere else (let's say a KEYWORDS or
DESCRIPTION meta tag), causing
swishdescription not to be displayed, then display the META_DESCRIPTION tag
INSTEAD OF the highlighted
BODY tag.

In other words, when the search results are displayed, if swishdescription
is blank (it would be in the case I describe
above), set swishdescription to the description meta tag and print that
instead of what's stored by the STOREDESCRITION
directive.





                                                                                                                                              
                    Bill Moseley                                                                                                              
                    <moseley@hank.       To:     Jeffrey.Grunstein@ny.frb.org                                                                 
                    org>                 cc:     Multiple recipients of list <swish-e@sunsite.berkeley.edu>                                   
                                         Subject:     Re: [SWISH-E] Returning Highlighted Text or the META Description                        
                    01/03/2003                                                                                                                
                    01:43 PM                                                                                                                  
                                                                                                                                              
                                                                                                                                              




On Fri, 3 Jan 2003 Jeffrey.Grunstein@ny.frb.org wrote:

> I'm running Swish-E 2.2.2 on Solaris 9.  I am running the swish.cgi that
> comes with the distribution.
> When I index, I define metaname properties for the DESCRIPTION and
KEYWORDS
> meta tags.
>
> When swish.cgi returns results, I want it to display the highlighted BODY
> text (I'm storing BODY tags
> as descriptions).  But if the match was found somewhere other than in
> swishdefault, no description
> is returned since the match was elsewhere (in the DESCRIPTION tag, for
> example).
>
> I want to modify swish.cgi to return the DESCRIPTION tag in this case.
> Here's what I have so far but
> it's not working.  Am I on the right path?  Is there an easier way to do
> it?   I'd appreciate any help.

Just so I'm clear, the swish.cgi docs suggest:

    StoreDescription HTML <body> 200000

and the default setup has

    description_prop    => 'swishdescription',

The first one says to store the <body> under the PropertyName
"swishdescritpion" and the second line tells swish.cgi to use the
"swishdescription" as the Proptery to display as the description.

So you want to instead use a meta tag called "description", right?

There's a couple ways to do that.

In your configs:

    PropertyNames description
    description_prop    => 'description',

or you could do it all in the config file for swish (and leave the
swish.cgi config alone)

     PropertyNames swishdescription
     PropertyNameAlias swishdescription description

Which is just making "description" look like property "swishdescription"

--
Bill Moseley
Received on Mon Jan 6 14:29:54 2003