Ignore:
Timestamp:
2010-10-12T13:55:07+13:00 (14 years ago)
Author:
kjdon
Message:

for incremental build, classifiers are not really done incrementally. Previously, we reconstructed all the docs from the database, and classified them, then processed any new/edited/deleted docs, updating the classifier as necessary. Now, we process all new/updated docs, then reconstruct the docs from the database, but only classify those not changed/deleted. This means that we are only ever adding docs to a classifier, never updating or deleting. I have removed edit_mode and all code handling deleting stuff from the classifier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/classify/AllList.pm

    r22220 r23116  
    7272sub classify {
    7373    my $self = shift (@_);
    74     my ($doc_obj, $edit_mode) = @_;
     74    my ($doc_obj) = @_;
    7575   
    7676    my $doc_OID = $doc_obj->get_OID();
    7777   
    78     if ($edit_mode eq "delete") {
    79     $self->oid_array_delete($doc_OID,'list');
    80    
    81     }
    82     elsif ($edit_mode eq "update") {
    83     # do nothing. Doc is already in the list. Is the order important??
    84     }
    85     else {
    86     push (@{$self->{'list'}}, $doc_OID);
    87     }
    88 
     78    push (@{$self->{'list'}}, $doc_OID);
     79   
    8980    return;
    9081}
Note: See TracChangeset for help on using the changeset viewer.