Disclaimer:Please excuse me if this is not the right place to post this, but I couldn’t figure the right place. (not
Code section right?).
Earlier release of the text searcher module that you might be using has a ‘serious’ bug in it. You can find full discussion of the bug on this forum
page. The bug basically wouldn’t allow you to delete indexed data of any document in your database. Moreover, if you are using any database other than MySQL you might also receive database error on erroneous use of a column whenever you invoke the
delete_document() method. I thought of making a note of this on PerlMonks in hopes this may prevent needless hours of debugging and extra cause for a headache on your part if you are using this module in any of your existing applications.
For reference, here’s the patch to cure the bug:
diff -ur --exclude=CVS D:\vlad\programming\perl\lib_dev\DBIx-FullTextS
+earch-0.61/lib/DBIx/FullTextSearch/String.pm D:\vlad\programming\perl
+\lib_dev\DBIx-FullTextSearch-0.61_patched/lib/DBIx/FullTextSearch/Str
+ing.pm
--- D:\vlad\programming\perl\lib_dev\DBIx-FullTextSearch-0.61/lib/DBIx
+/FullTextSearch/String.pm Fri Mar 23 17:00:38 2001
+++ D:\vlad\programming\perl\lib_dev\DBIx-FullTextSearch-0.61_patched/
+lib/DBIx/FullTextSearch/String.pm Wed May 01 14:38:44 2002
@@ -56,6 +56,12 @@
$self->SUPER::index_document($id, $data);
}
+sub delete_document {
+ my ($self, $doc_id) = @_;
+
+ $self->SUPER::delete_document($self->get_id_for_name($doc_id));
+}
+
sub contains_hashref {
my $self = shift;
my $res = $self->SUPER::contains_hashref(@_);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.