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/AZSectionList.pm

    r18455 r23116  
    7171sub classify {
    7272    my $self = shift (@_);
    73     my ($doc_obj,$edit_mode) = @_;
     73    my ($doc_obj) = @_;
    7474
    7575    my $doc_OID = $doc_obj->get_OID();
     
    7777
    7878    while (defined $thissection) {
    79     $self->classify_section ($thissection, $doc_obj, $edit_mode);
     79    $self->classify_section ($thissection, $doc_obj);
    8080    $thissection = $doc_obj->get_next_section ($thissection);
    8181    }
     
    8484sub classify_section {
    8585    my $self = shift (@_);
    86     my ($section, $doc_obj, $edit_mode) = @_;
     86    my ($section, $doc_obj) = @_;
    8787
    8888    my $doc_OID = $doc_obj->get_OID();
    89 
    90     if ($edit_mode eq "delete") {
    91     $self->oid_hash_delete("$doc_OID$section",'list');
    92     return;
    93     }
    9489
    9590    my $metavalue;
Note: See TracChangeset for help on using the changeset viewer.