Changeset 27565

Show
Ignore:
Timestamp:
06.06.2013 12:02:03 (6 years ago)
Author:
kjdon
Message:

ignore special keywords which should be only in indexes list, and ignore sort special keyword 'rank'

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/lucenebuildproc.pm

    r27563 r27565  
    8888    my $self = shift (@_); 
    8989  
    90     ($self->{'sortfields'}) = @_; 
     90    my ($sortfields) = @_; 
     91    $self->{'sortfields'} = (); 
     92    # lets just go through and check for text, allfields, metadata which are only valid for indexes, not for sortfields 
     93    foreach my $s (@$sortfields) { 
     94    if ($s !~ /^(text|allfields|metadata)$/) { 
     95        push (@{$self->{'sortfields'}}, $s); 
     96    } 
     97    } 
    9198} 
    9299 
     
    353360         
    354361    foreach my $sfield (@{$self->{'sortfields'}}) { 
     362        # ignore special field rank 
     363        next if $sfield eq "rank"; 
    355364        my $sf_shortname; 
    356365        if (defined $self->{'sortfieldnamemap'}->{$sfield}) {