NEAR non-leaf subqueries

Olly Betts olly at survex.com
Thu Jan 12 05:14:12 GMT 2017


On Wed, Jan 04, 2017 at 07:29:58AM +0100, Jean-Francois Dockes wrote:
> Olly Betts writes:
> > The ticket has a patch which attempts to handle the OR case (which seems
> > to be the part you actually care about) but this suffers from issues with
> > object lifetimes which get a bit involved in the details.  Since there
> > wasn't a working patch when we got to making the hard decisions about
> > which tickets to bump to get 1.4.0 out, and since addressing this
> > shouldn't require ABI changes, it got bumped.
> 
> Thank you for this answer.
> 
> I need to choose between three approaches:
> 
>  - Implement support at the application level.
>  - Shift back to 1.2 
>  - Just wait for 1.4.x

Or help fix up the patch in the ticket?

> I'd rather go back to 1.2 than used a patched 1.4 by the way.

Once we have a working patch, it should be mergable into 1.4.x (I can't see why
any ABI changes would be needed) so using a patched 1.4 shouldn't be an issuie.

> This all depends on your expected schedule (I guess that this would have
> been a better term than 'plan', which is indeed described in the ticket). I
> am not asking for anything beyond information here. Do you have any idea of
> the very approximate time when the change might be implemented ?

I had another poke at the patch and have a reworked version which solves the
object lifetime issue and works for some simple tests.  Can you try it out
and see if it works for you?

https://trac.xapian.org/ticket/508#comment:13

There are two limitations:

 * Only OP_OR subqueries are handled.  I think supporting these would be a
   useful step forward by itself, and AIUI it's all you actually need.

 * Currently the OP_OR subqueries can only have two subqueries of their own.
   Lifting this restriction needs a bit of work on the new OrPositionList class
   - the old patch used a series of pairwise OrPositionList objects, but the
   new patch needs a single one instead - the class needs reworking to handle
   that. 

So I think the second limitation needs addressing, and of course any bugs
resolving.

I can't promise anything re schedule, but hopefully we can sort this out
fairly soon.  At least the solution for what's missing now is fairly clear -
we probably want to put the sub-positionlists into a min heap.

Cheers,
    Olly



More information about the Xapian-discuss mailing list