Re: [greenstone-devel] Section and Document Level Metadata Issues

From Katherine Don
DateFri, 05 Aug 2005 09:53:11 +1200
Subject Re: [greenstone-devel] Section and Document Level Metadata Issues
In-Reply-To (18D8B7B3796EA447AE4311C939B268BB2219BB-smathersnt2-uflib-ufl-edu)
Hi Mark

This email was a bit spooky. We have never really taked about these
things before, and just on the morning before receiving the email I had
thought about adding parent:sibling, and Michael wanted to do combined
document and section level searching.

So, I have implemented parent:sibling (and child:sibling), and it will
be available in the next release (hopefully next week). Details about
the syntax are at
http://www.greenstone.org/cgi-bin/library?e=p-en-faq-utfZz-8&a=p&p=faqcustomize#customizeformat

For the second issue, you can't do document and section combined
searching, but you can modify the perl to index document level metadata
in the sections. I assume you are using mgpp?
in perllib/mgppbuildproc.pm

On line 272ish change:

foreach my $item (@{$doc_obj->get_metadata ($section,
$real_field)}) {

to

my @section_metadata = @{$doc_obj->get_metadata
($section, $real_field)};
# Use document-level metadata if none at section-level
if (scalar(@section_metadata) == 0) {
@section_metadata = @{$doc_obj->get_metadata
($doc_obj->get_top_section(), $real_field)};
}
foreach $item (@section_metadata) {

if you always want doc level metadata to be indexed, then use teh
following line instead of the if statement.

push (@section_metadata, @{$doc_obj->get_metadata
($doc_obj->get_top_section(), $real_field)});

(if you are not using mgpp, then you can apply the same fix to
mgbuildproc.pm or llucenebuildproc.pm)

Regards,
Katherine

Mark Sullivan wrote:
> Greetings,
>
> We are currently running Greenstone 2. Both of my issues are in regards to
> collections which use the PagedImgPlug-in, and have to do with section-level
> versus document-level metadata. For now, we are using the librarian
> interface to enrich each document's metadata. As I can not modify the
> entire folder, I am selecting the '.item' file in the librarian, and then
> adding metadata to that.
>
> 1) I am unable to show repeating metadata fields when entering the
> formatting statements for DocumentHeading or DocumentText. I want to show
> the entire citation with each page image. I can reference single fields by
> using the 'parent(Top):dc.Title' type of grammar. However, when I try to
> pair this with the 'sibling' key word, it does not seem to work. That is, I
> can't find any combination of sibling and parent to show ALL of the subject
> fields. I would have thought it would have been something like..
> 'sibling:parent(Top):dc.Subject' or
> 'sibling(All','):parent(Top):dc.Subject'.
>
> 2) I am looking to get the pages that a phrase of full text appears, but
> want to include book information in the search. That is, I want to find the
> page references for the phrase "Blue-Footed Booby" only in books with the
> word "Species" in the title. It does not appear this is possible, since one
> is a section search, and another is a document search?
>
> Is there a way to make each section inherit all the metadata from the
> document to relieve both of these problems?
>
> Mark V Sullivan
> Systems Programmer
> Digital Library Center
> University of Florida
> (352) 846 - 0129
>
>
> _______________________________________________
> greenstone-devel mailing list
> greenstone-devel@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel
>