Re: MySQL fulltext search

[prev] [thread] [next] [Date index for 2004/12/28]

From: Tony Bowden
Subject: Re: MySQL fulltext search
Date: 15:44 on 28 Dec 2004
On Tue, Dec 28, 2004 at 07:16:39AM -0800, cdbi@xxxxxxxxxxxxx.xxx wrote:
> Is there anything available to enable fulltext searches via MySQL
> and CDBI?  I didn't find anything via CPAN.

In your base class you could have something like:

	sub create_full_text_search { 
		my ($class, $name, @cols) = @_;
		my $cols = join ", ", @cols;
		$class->add_constructor($name => "MATCH ($cols) AGAINST ?");
	}

Then in any given class:

	__PACKAGE__->create_full_text_search(search_flibs => qw/flib bob/);


This is completely untested, but something along those lines should do
the trick...

Tony

Re: MySQL fulltext search
15:16 on 28 Dec 2004

Re: MySQL fulltext search
Tony Bowden 15:44 on 28 Dec 2004

Re: MySQL fulltext search
Juan Camacho 16:18 on 28 Dec 2004

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52