From: James A. <jam...@ta...> - 2004-01-01 22:54:37
|
This means that you can do something like: ---------------------------------------------------------------------- matches = enquire.get_mset(...) for match in matches: doc = match[xapian.MSET_DOCUMENT] ---------------------------------------------------------------------- The 'match' returned from the MSet used as an iterator is a list containing MSET_DID, MSET_WT, MSET_RANK, MSET_PERCENT, MSET_DOCUMENT - in order, the document id, the weight, the rank, the percentage relevance, and the actual xapian.Document(), which is ultimately what you probably want access to anyway. Examples have been updated. It'll be fairly easy to do the same thing for ESet, and indeed any other containers in Xapian. (This was, in fact, very easy to do; the hardest bit was setting up the new extra.i stuff ...) J ----- Forwarded message from James Aylett <ja...@ix...> ----- Log message: Python bindings: MSet provides a Python iterator (new target language-specific interface file extra.i included at end of xapian.i to accomodate this). ----- End forwarded message ----- -- /--------------------------------------------------------------------------\ James Aylett xapian.org ja...@ta... uncertaintydivision.org |