Changeset 21564 for main/trunk/greenstone2/perllib/IncrementalBuildUtils.pm
- Timestamp:
- 2010-01-21T15:59:35+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/IncrementalBuildUtils.pm
r21562 r21564 31 31 # * by John Rowe 32 32 # * @version 2.0 Package version including seperation from calling code and 33 # * modularisation by creating gdbmget, gdbmset and 34 # * get_database_path by John Rowe 33 # * modularisation by John Rowe 35 34 # * 36 35 # * @author John Thompson, DL Consulting Ltd. … … 153 152 # * 1. The Lucene index must be updated. This will involve removing any 154 153 # * existing value and, if required, adding a new value in its place. 155 # * 2. The GDBMdatabase must be updated. Again any existing value will be154 # * 2. The info database must be updated. Again any existing value will be 156 155 # * removed and, if required, a new value added. 157 156 # * 3. Finally a check against the collect.cfg will be done to determine if … … 165 164 # * A. Establish connection to Lucene 166 165 # * B. Create a IncrementalDocument object for 'NT1' loading the information 167 # * from the GDBM166 # * from the info database 168 167 # * C. Check to see if this metadata is used to build a classifier(s) and if 169 168 # * so create the appropriate ClassifyTreeModel(s) … … 177 176 # * iii/ Call addDocument() in ClassifyTreeModel(s) as necessary 178 177 # * F. Complete Lucene transaction 179 # * G. Save IncrementalDocument to GDBM180 # * Note: ClassifyTreeModel automatically updates GDBMas necessary.178 # * G. Save IncrementalDocument to info database 179 # * Note: ClassifyTreeModel automatically updates the info database as necessary. 181 180 # * 182 181 # * @param $collection The name of the collection to update as a string … … 202 201 # Lucene daemon. 203 202 # B. Create a IncrementalDocument object for 'NT1' loading the information 204 # from the GDBM203 # from the info database 205 204 print STDERR "* creating incremental document for $oid\n" unless !$debug; 206 205 my $doc_obj = new IncrementalDocument($collection, $oid); … … 232 231 if (defined($old_value) && $old_value =~ /[\w\d]+/) 233 232 { 234 print STDERR "* removing '$key'='$old_value' from GDBMdatabase for document $oid\n" unless !$debug;233 print STDERR "* removing '$key'='$old_value' from info database for document $oid\n" unless !$debug; 235 234 # i/ Call ??? to remove key-value from Lucene index 236 235 # Moved elsewhere … … 247 246 if (defined($new_value) && $new_value =~ /[\w\d]+/) 248 247 { 249 print STDERR "* adding '$key'='$new_value' to GDBMdatabase for document $oid\n" unless !$debug;248 print STDERR "* adding '$key'='$new_value' to info database for document $oid\n" unless !$debug; 250 249 # i/ Call ??? to add key-value from Lucene index 251 250 # Moved elsewhere … … 265 264 &callGS2LuceneEditor($collection, $doc_obj->getDocNum, $key, $old_value, $new_value); 266 265 } 267 # G. Save IncrementalDocument to GDBM266 # G. Save IncrementalDocument to info database 268 267 $doc_obj->saveDocument(); 269 268 $doc_obj = 0; … … 371 370 # /** callGS2LuceneEditor() **/ 372 371 373 ## Remove a document from the GDBMand Index.372 ## Remove a document from the info database and Index. 374 373 # 375 374 # @param collection The collection to alter … … 388 387 if ($doc_num > -1) 389 388 { 390 # Now use the GDBM utils to write a blank string to this oid in the 391 # database 389 # Now write a blank string to this oid in the info database 392 390 my $index_text_directory_path = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "index", "text"); 393 391 my $infodb_file_path = &dbutil::get_infodb_file_path("gdbm", $collection, $index_text_directory_path);
Note:
See TracChangeset
for help on using the changeset viewer.