Changeset 27565 for main


Ignore:
Timestamp:
2013-06-06T12:02:03+12:00 (11 years ago)
Author:
kjdon
Message:

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

File:
1 edited

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}) {
Note: See TracChangeset for help on using the changeset viewer.