← Back to team overview

launchpad-dev team mailing list archive

Re: "subscribe to search": implementation questions

 

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

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 ;)

Abel

> 
> -Rob
> 
> On Tue, Aug 17, 2010 at 9:25 PM, Graham Binns <graham@xxxxxxxxxxxxx> wrote:
>> On 17 August 2010 10:20, Abel Deuring <abel.deuring@xxxxxxxxxxxxx> wrote:
>>>> Also, I don't see why full text search rather than structured search
>>>> is needed here - I mean, if the data is structured fairly clearly,
>>>> just a regular query would do, wouldn't it?
>>>
>>> People might be interested to subscribe only to a subset of bugs of a
>>> project or source package which affect a certain aspect.
>>>
>>> Well, a use case would be "subscribe to all new bugs for firefox which
>>> mention 'flash'". Sure, you can use tags to do this, but if the tag does
>>> not exist for whichever reason, for example, disagreement if it makes
>>> sense for the project/package, or if you want to see new bugs in order
>>> to decide if the bug should be labeled with the tag, a full text search
>>> is quite convenient, I think.
>>
>> My ha'p'orth of unhelpful confirmation:
>>
>> +1. We definitely need to support subscribing to a textual search,
>> either in the first iteration of search subscriptions or in the
>> not-too-distant future.
>>
>> --
>> Graham Binns | PGP Key: EC66FA7D
>> http://launchpad.net/~gmb
>>
> 




Follow ups

References