[Xapian-discuss] Open postlist

Olly Betts olly at survex.com
Fri Oct 17 04:08:21 BST 2008


On Thu, Oct 16, 2008 at 01:01:29PM +0100, James Aylett wrote:
> On Thu, Oct 16, 2008 at 12:13:11PM +0200, double wrote:
> 
> > The FAQ (http://trac.xapian.org/wiki/FAQ/UniqueIds) recommends,
> > to open a postlist instead of a search:
> >      If you want to retrieve the document, open the postlist for "Q65A"
> >      and read the first (and only) document id (this will be a little more
> >      efficient that running a search for "Q65A").
> > 
> > How can I open the postlist?
> 
> In C++, use Xapian::Database::postlist_begin("Q65A") (compare with
> postlist_end("Q65A") in the usual way). In other languages (such as
> Python) there may be more idiomatic approaches - see the bindings
> documentation for your language in this case.

I've added the C++ example to the FAQ entry:

http://trac.xapian.org/wiki/FAQ/UniqueIds

Cheers,
    Olly



More information about the Xapian-discuss mailing list