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: Mon Sep 05 2005 - 15:08:53 GMT
>From: Bill Moseley <moseley@hank.org>
>To: andy rosbrook <andy_rosbrook@hotmail.com>
>CC: Multiple recipients of list <swish-e@sunsite3.berkeley.edu>
>Subject: Re: Defining Custom Properties
>Date: Mon, 5 Sep 2005 07:58:15 -0700
>
>On Mon, Sep 05, 2005 at 07:47:23AM -0700, andy rosbrook wrote:
> > Hi all
> >
> > I was wondering weather it is possible to define your own property and 
>then
> > retrive this through the SWISH API?
>
>The swish API if for searching an existing index.  Not creating an
>index where you define a property.
>
> > I would like to define a 'category' property for a specifiec index and 
>then
> > retrive the value of this through the API.
>
>In perl you do:
>
>     $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.
>
> > I've checked out defining custom meta tags but my problem slightly 
>differs,
> > the property will not appear in the indexed document, i would like to 
>set it
> > in the config itself, something like this:
> >
> > MetaNames Category "books"
>
>Oh, so you want it index-wide?  So every call to
>
>     $result->Property('category')
>
>returns "books"?
>
>No, there's nothing to do that.  There's a few index headers that you
>can set (IndexAdmin, IndexName, IndexDescription, IndexPointer),
>though

This is a possible solution, i could simply set IndexDescription as 'books', 
can this property be retrived using the API?
>
>Otherwise, you would need to set the value on every input file.
>
>
>
>
>
>--
>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
>

thanks
andy

_________________________________________________________________
Winks & nudges are here - download MSN Messenger 7.0 today! 
http://messenger.msn.co.uk
Received on Mon Sep 5 08:08:53 2005