Skip to main content.
home | support | download

Back to List Archive

Re: Storing Descriptions from both META and BODY tags

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Fri Sep 27 2002 - 18:34:01 GMT
At 11:10 AM 09/27/02 -0700, Jeffrey.Grunstein@ny.frb.org wrote:
>We just installed Swish-E 2.2 on a Solaris 9 box.
>
>I want to store descriptions of my files (this is an intranet site) but not
>all of them are
>meta-tagged.
>
>Can I have two StoreDescription attributes in my config file like this:
>
>IndexContents  HTML2 .html
>StoreDescription HTML2 <meta_description>
>StoreDescription HTML2 <body> 250
>
>My intention is for it to look for a META tag first and use it if it's
>there.
>If there isn't one, then look at the BODY tag.
>
>Will this work as I defined it above?

No.  StoreDescription can only know about one meta tag.

But you can say:

  PropertyNames meta_description
  PropertyNameAlias meta_description body
  PropertyNamesMaxLength 250 meta_description 

If you want to call it "swishdescription"

  PropertyNames swishdescription
  PropertyNameAlias swishdescription meta_description body
  PropertyNamesMaxLength 250 swishdescription

But that will not do exactly what you want -- as it will use both if both
are found.

If you want to do that I'd just do

  PropertyNames meta_description body
  PropertyNamesMaxLength 250 meta_description body

And then, say, in your CGI script do something like:

   my $desc = $props{meta_description} || $props{body};



-- 
Bill Moseley
mailto:moseley@hank.org
Received on Fri Sep 27 18:37:33 2002