[Xapian-discuss] adding postings vs matchdecider on a value

jarrod roberson jarrod at vertigrated.com
Sun Jun 4 21:02:52 BST 2006


I have my basic queries working now thanks to suggestions from the list.

Now I am trying to craft a "Depth 1" style query and have come up with 2
possible solutions.

In WebDAV ( RFC2518) a "Depth 1" listing of all the resources that are
CHILDREN of a COLLECTION.
Similar to what a normal ls does in unix.

The 2 ideas I have come up with are.

1. Using positional posting terms to be able to refine the query.

Since I am already adding positional postings for the complete logical path,
I was thinking about adding all the path parts with difference prefixes and
doing the same thing I am with the logical path.

2. Using a MatchDecider and another value().

I already implemented this, but I don't think this is the optimal way. Since
the basic query is like a Depth Infinity ( which means it brings back
EVERYTHING ) I am filtering on a value() that contains the entire parent
path ( there is no limit on the path sizes ) so this could be really bad in
degenerate cases.



I think #1 is probably the best way, since all the terms will be used by
lots of documents, it shouldn't cause too much data bloat. And it should cut
down on the btree accesses as well.

What I can't find in any examples or documentation, is what happens when you
have multiple terms with the same posting postiion? I have tried it, xapian
lets you do it, but I can find out what, if any side effects there are from
doing it.

I am trying to think of some way I can just check for the existance of a
positional term, to exclude everything but the direct children. That would
not require any additional values or terms!

Any ideas are appreciated


More information about the Xapian-discuss mailing list