Skip to main content.
home | support | download

Back to List Archive

Re: Defining Custom Properties

From: andy rosbrook <andy_rosbrook(at)not-real.hotmail.com>
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"
IndexDir spider.pl
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 
'IndexName'

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 
file?

thanks
andy



>From: Bill Moseley <moseley@hank.org>
>Reply-To: moseley@hank.org
>To: Multiple recipients of list <swish-e@sunsite3.berkeley.edu>
>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 
>category
> > inside the config file? I have an automated system which generates
> > swish.config for diffrent file types and indexes, so i was thinking i 
>could
> > also add what category the results are from.
> > Eg.
> >
> > www.books.com
> > www.google.com
> >
> > might belong to the 'resource' category.
> >
> > So a seprate indexes will have seprate property values as i write the 
>config
> > through perl.
>
>Why not?:
>
>     my $resource = $swish->HeaderValue( 'IndexName' );
>
> > This is a possible solution, i could simply set IndexDescription as 
>'books',
> > can this property be retrived using the API?
>
>I think so.
>
>--
>Bill Moseley
>moseley@hank.org
>
>Unsubscribe from or help with the swish-e list:
>    http://swish-e.org/Discussion/
>
>Help with Swish-e:
>    http://swish-e.org/current/docs
>    swish-e@sunsite.berkeley.edu
>

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends 
http://messenger.msn.co.uk
Received on Tue Sep 6 03:23:31 2005