Re: [greenstone-users] joint indexes with mgpp

From jens wille
DateTue, 11 May 2004 06:36:49 +0200
Subject Re: [greenstone-users] joint indexes with mgpp
In-Reply-To (409FF3B2-6010208-cs-waikato-ac-nz)
hi katherine,

Katherine Don wrote:
> Hi Jens
>
> here are some pointers which may or may not be useful.
>
> in the config file, we specify mgpp indexes like indexes text
> Title Creator
>
> even though they are specified separately, in the mgppbuilder
> class they get joined together into one index specification like
> text,Title,Creator (mgppbuilder.pm 143-146)
i already figured this out, but i was wondering if there is a
special reason to it. does the extra functionality mgpp provides
arise from the fact that it uses just one physical index? i hope not ;-)

> when getting the actual text to go into the index (text function
> in mgppbuildproc.pm), it iterates over these fields, and outputs
> each one. text is output with <TX> tags, and metadata fields are
> output with a short code tag eg Title would be <TI>the title</TI>
>
>
> I suggest you specify the indexes in the config file like indexes
> text Author1 Author2 Author3 Author1,Author2,Author3
>
> This makes it similar to mg index specification. you can specify
> collectionmeta for the display names collectionmeta .text "text"
> collectionmeta .Author1 "1st author" collectionmeta
> .Author1,Author2,Author3 "all authors" etc
>
> In mgppbuilder, join them all together into one string for the
> index, but use a different separator for the individual fields,
> and the combined fields.
well, that sounds sensible, and i will give it a try...

> Then in mgppbuildproc, you can iterate over the fields and for
> each field, iterate over the parts and add the text in under a
> single tag.
>
> dont forget to store the tag name you have used
> $self->{'indexfieldmap'}->{$real_field} = $shortname;
> $self->{'indexfieldmap'}->{$shortname} = 1;
>
> $shortname is the tag name, and $real_field - in this case this
> should be eg Author1,Author2,Author3
>
> Well, good luck. If you need any help, please feel free to ask.
thank you very much indeed.

> Once you have implemented this, you may like to give the code to
> us so that we can add it into the next Greenstone release :-)
of course! :-)

regards

jens