Skip to main content.
home | support | download

Back to List Archive

Re: Defining Custom Properties

From: andy rosbrook <andy_rosbrook(at)>
Date: Tue Sep 06 2005 - 10:23:27 GMT
I dont think that this method works? I've tried to index with the following 
config file:

IndexName "BOOKS"
SwishProgParameters spider.config

DefaultContents HTML

FileFilter  .pdf   pdf2html

IndexContents HTML* .html .htm .shtml .pdf .php
IndexContents XML* .xml
StoreDescription HTML <body> 320
StoreDescription XML <body> 320

UndefinedMetaTags auto

I used IndexName to specify the category of the index. I then attempted to 
use the api to retrive the value but it could not find the header value.

$swish->HeaderNames returns only 'IgnoreTotalWordCountWhenRanking'

when i try: $swish->HeaderValue($index,'IndexName') this error is thrown:

Index Header Error: Index file 'index.swish-e' does not have header 

Am i doing something wrong during indexing? I indexed with the command 
swish-e -c swish.config -S prog

Is there any other way i can attach and retrive information from an index 


>From: Bill Moseley <>
>To: Multiple recipients of list <>
>Subject: [SWISH-E] Re: Defining Custom Properties
>Date: Mon, 5 Sep 2005 10:24:48 -0700 (PDT)
>On Mon, Sep 05, 2005 at 08:08:06AM -0700, andy rosbrook wrote:
> > >     $prop = $result->Property('category');
> >
> > This is what i would be after, but am i able to define the property 
> > inside the config file? I have an automated system which generates
> > swish.config for diffrent file types and indexes, so i was thinking i 
> > also add what category the results are from.
> > Eg.
> >
> >
> >
> >
> > might belong to the 'resource' category.
> >
> > So a seprate indexes will have seprate property values as i write the 
> > through perl.
>Why not?:
>     my $resource = $swish->HeaderValue( 'IndexName' );
> > This is a possible solution, i could simply set IndexDescription as 
> > can this property be retrived using the API?
>I think so.
>Bill Moseley
>Unsubscribe from or help with the swish-e list:
>Help with Swish-e:

Use MSN Messenger to send music and pics to your friends
Received on Tue Sep 6 03:23:31 2005