← Back to team overview

launchpad-dev team mailing list archive

Re: "subscribe to search": implementation questions

 

On Tue, Aug 17, 2010 at 10:12 PM, Abel Deuring
<abel.deuring@xxxxxxxxxxxxx> wrote:
> On 17.08.2010 11:45, Robert Collins wrote:
>> So there is some conflation/confusion here I think.
>>
>> *subscribing* to a ft search - +1
>>
>> putting a tsearch vector in the *subscription* - I'm lost why that is useful.
>
> It's not a tsearch vector but a tsquery I want to store :)
>
> If you have a number of subscriptions to a full text search -- how else
> would you remove the not matching searches in something like
>
>  SELECT whatever FROM bugsubscription
>   WHERE bugsubscription.bug=our_current_bug_id
>     AND there_is_a_match(
>        (SELECT full_text FROM bug WHERE id=our_current_bug_id),
>        bugsubscription.fulltext_search_words)
>
> With a canned tsquery you can use an WHERE expression like
>
>  bugsubscription.tsquery @@ bug.fti

I'd _really_ like to see a performance test of that; if it behaves
like some of the ts2 stuff we may be very disappointed.

Long term we'll need an answer for out-of-db search though, when we
drop bug.fti (which I'm pretty confident will be the right thing to
do: ts2 has significant limitations and no sign of workarounds).

> The other option I see would be to return all possible subscriptions in
> the SELECT and implement the fulltext filtering in Python -- but you
> didn't like that ;)

I think it would scale poorly, yes.

-Rob



Follow ups

References