Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • http://search.cpan.org/~tjmather/DBIx-FullTextSearch-0.73/
    http://search.cpan.o rg/~tmtm/Class-DBI-mysql-FullTextSearch-0.09/
    http://search.cpan.org/~snowhare/ Search-InvertedIndex-1.14/

    I used the last one with good results.
    --
    --
    life is short
    • Yup the last one is a reverse index. They work nicely and are trivial to write and customise.

      I wrote a handy class that implements cross-object context specific searching - Class-Indexed-0.01 [cpan.org]

      Its based on the article I wrote for perl.com

      The others aren't a solution - native RDBMS fulltext searching is only useful for really trivial cases - if your data is only in a single table and has a very simple structure so you are only interested in 1 or 2 columns and they don't change - move beyond that and nati

      --

      @JAPH = qw(Hacker Perl Another Just);
      print reverse @JAPH;
      • It depends on how the database implements the full text search. Often it is just a reverse index under the covers, with some stemming and phrase support bolted on.

        I agree that a reverse index is typically the way to go for custom searching. It scales well and is very customizable.

        • I have yet to see an RDBMS native fulltext search that is as good as a handwritten one - all are held back by a total lack of customisation or weighting and can only apply to a single table. Very few provide features like stemming although they can provide some simple phrase matching and global weightings (i.e. common words may score less, etc).

          As I said, even a good native RDBMS can be improved on trivially with a competent custom reverse index, as stemming, etc are trivial in perl. Native RDBMS are only useful if you happen to have one or two columns that you wish to index in a single table along with a primary key in the same table. If you move outside that domain even 'enterprise' databases like Oracle and SQL Server native fulltext searches are next to useless, hell if you use SQL server you need to write your own anyway as it requires manual reindexing, obscure and archaic syntax (both in the query and the stored procedures to use it).

          --

          @JAPH = qw(Hacker Perl Another Just);
          print reverse @JAPH;