[greenstone-users] mdoffset problem in List classifer

From Yitzchak Schaffer
DateTue Apr 20 03:36:21 2010
Subject [greenstone-users] mdoffset problem in List classifer
In-Reply-To (4BCC67FF-40901-gmx-com)
On 4/19/2010 10:26, Yitzchak Schaffer wrote:
> Problem is, when we build the collection, not all the nodes of the
> classifier are getting mdoffset values assigned:
>
> 1;;;0;0;12;13;1;0;0;;;;1;0;18;1;13;0;0;0;0;0;0;1

Update: looks like it might be due to an apparent workaround in
List::add_sorted_leaf_items() :

# Sort leaf nodes and add to list
my @sort_leaf_nodes_using_metadata_groups =
@{ $self->{'sort_leaf_nodes_using_metadata_groups'} };
foreach my $sort_leaf_nodes_usingmetaelem (
reverse @sort_leaf_nodes_using_metadata_groups )
{
my $OID_to_metadata_values_hash_ref =
$self->{ $sort_leaf_nodes_usingmetaelem . ".list" };

# Force a stable sort (Perl 5.6's sort isn't stable)
# !! The [0] bits aren't ideal (multiple metadata values) !!
@OIDs = @OIDs[
sort {
$OID_to_metadata_values_hash_ref->{ $OIDs[$a] }[0]
cmp $OID_to_metadata_values_hash_ref->{ $OIDs[$b] }[0]
|| $a <=> $b;
} 0 .. $#OIDs
];
}

Is there a fix for this, or do I need to get my Perl boots on?

Thanks,

--
Yitzchak Schaffer
Systems Manager
Touro College Libraries
33 West 23rd Street
New York, NY 10010
Tel (212) 463-0400 x5230
Fax (212) 627-3197
Email yitzchak.schaffer@tourolib.org

Access Problems? Contact systems.library@touro.edu