[Xapian-discuss] identifying matched terms
Olly Betts
olly at survex.com
Wed Dec 21 08:11:43 GMT 2005
On Tue, Dec 20, 2005 at 04:28:45PM -0800, Jason Toffaletti wrote:
> RuntimeError: InvalidOperationError: positionlist_begin not supported
>
> Which is consistent with the code I see here:
> http://www.xapian.org/docs/sourcedoc/html/termlist_8h-source.html
That's just the default implementation in the base class. We implement
positionlist_begin in the subclasses when appropriate (sometimes it
isn't - for example the listed of terms ignored as stopwords is
available from the QueryParser as a TermIterator, but there's no
document context there so positionlist_begin() doesn't make sense
at the conceptual level).
But it sounds like we've missed a case where it should work. I'll
take a look, but as a workaround you can get a positionlist from the
database by supplying the term and document id explicitly:
http://xapian.org/docs/apidoc/html/classXapian_1_1Database.html#a13
For the backends we currently have, that's as efficient as getting it
from the TermIterator would be.
Cheers,
Olly
More information about the Xapian-discuss
mailing list