[Catalyst] Re: Catalyst::Model::Xapian usage

Richard Jolly richardjolly at mac.com
Fri Jan 26 19:43:42 GMT 2007


On 23 Jan 2007, at 18:43, Adam Jacob wrote:

> On Jan 23, 2007, at 5:41 AM, Adam Sjøgren wrote:
>
>> On Sun, 14 Jan 2007 19:01:00 -0800, Adam wrote:
>>
>>> Personally, I wrote my own model to Xapian.

I started with Catalyst::Model::Xapian, but by now I've rewritten 
everything to suit. It got me started, but I'm not sure it's generic 
enough.

>>> I also wound up re-writing
>>> the query parser, because I needed things like range searching and
>>                                                  ^^..       ..^^
>> Sounds interesting! Do you care to share your code, or briefly explain
>> what is needed to do range searching?

I've currently got a hybrid approach, where I call QueryParser to 
create a bunch of different queries, and then combine them.

> I would be happy to share the code, although it's not really 
> CPAN-ready quite yet.   The short version is that implementing things 
> like Range searching and Regular Expressions requires manually walking 
> through the term list, and adding all the terms that match to the 
> query.
>
> It's basically the same way that Xapian's default query parser handles 
> right side wildcarding.  You jump to the point in the termlist to 
> begin, and go until you get past the second condition.
>
> Just for kicks, I've attached the basic class here.  It's taken from 
> part of a larger project, and it definitely has some bugs.  If you 
> decide to improve it, I would love patches.

It's been very helpful for comparison - thanks.

Richard

> Thanks!
>
> Adam
> <XapianParser.pm>_______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: 
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/




More information about the Catalyst mailing list