[Xapian-devel] Re: [Xapian-discuss] Xapian 1.0.1 released
Olly Betts
olly at survex.com
Tue Jun 12 16:53:01 BST 2007
On Tue, Jun 12, 2007 at 05:10:07PM +0200, Daniel M?nard wrote:
> Here is my guess about what happens:
>
> The important point is that in setup(), $stopper is a local variable.
> At the end of setup() the variable is deleted which, I think, causes
> Xapian to free the underlying c++ object
Yes, that's probably right - there are a few issues like this we need
to address.
> Is-it a bug? My scenario is probably not the common usage (setting up
> the query parser in one function, using it in another one).
> On the other hand, the internal stopper should not be deleted if another
> object still uses it, no?
It is a bug.
> >Perhaps that's wrong - it seems like NOT should probably bind more
> >tightly (...)
> >
> >So either most people don't notice (or care), or it's working as most
> >people expect. I suspect the former, so it's probably OK to change
> >this.
>
> I also think that "not" should be given higher precedence, even if I was
> not able to find doc from google/yahoo/others stating explicitly on that
> point.
Did you try some queries to see what precendence they give it?
> However, I'm not sure it is worth changing this if everyone is happy
> with that (I was not asking for a change, just saying I was surprised)...
I doubt anyone has really considered the case before (I hadn't, despite
writing both incarnations of the QueryParser), so it would probably be
OK to change.
Cheers,
Olly
More information about the Xapian-devel
mailing list