Changeset 21642
- Timestamp:
- 2010-01-26T17:10:39+13:00 (14 years ago)
- Location:
- main/trunk/greenstone2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/removedocument.pl
r12844 r21642 28 28 my $oid = $ARGV[1]; 29 29 30 &IncrementalBuildUtils::deleteDocument($collection, $oid);30 &IncrementalBuildUtils::deleteDocument($collection, "gdbm", $oid); 31 31 32 32 exit; -
main/trunk/greenstone2/perllib/IncrementalBuildUtils.pm
r21564 r21642 377 377 sub deleteDocument() 378 378 { 379 my ($collection, $ oid) = @_;379 my ($collection, $infodbtype, $oid) = @_; 380 380 # Load the incremental document to go with this oid, as we need some 381 381 # information from it. … … 389 389 # Now write a blank string to this oid in the info database 390 390 my $index_text_directory_path = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "index", "text"); 391 my $infodb_file_path = &dbutil::get_infodb_file_path( "gdbm", $collection, $index_text_directory_path);392 my $infodb_file_handle = &dbutil::open_infodb_write_handle( "gdbm", $infodb_file_path, "append");393 &dbutil::write_infodb_entry( "gdbm", $infodb_file_handle, $oid, &dbutil::convert_infodb_string_to_hash(""));391 my $infodb_file_path = &dbutil::get_infodb_file_path($infodbtype, $collection, $index_text_directory_path); 392 my $infodb_file_handle = &dbutil::open_infodb_write_handle($infodbtype, $infodb_file_path, "append"); 393 &dbutil::write_infodb_entry($infodbtype, $infodb_file_handle, $oid, &dbutil::convert_infodb_string_to_hash("")); 394 394 # Remove reverse lookup 395 &dbutil::write_infodb_entry( "gdbm", $infodb_file_handle, $doc_num, &dbutil::convert_infodb_string_to_hash(""));396 &dbutil::close_infodb_write_handle( "gdbm", $infodb_file_handle);395 &dbutil::write_infodb_entry($infodbtype, $infodb_file_handle, $doc_num, &dbutil::convert_infodb_string_to_hash("")); 396 &dbutil::close_infodb_write_handle($infodbtype, $infodb_file_handle); 397 397 398 398 # And remove from the database
Note:
See TracChangeset
for help on using the changeset viewer.