[Xapian-devel] Question about Document and TermIterator.get_termfreq()

Marius Tibeica mtibeica at gmail.com
Mon Jul 9 20:41:46 BST 2012


While porting the unit tests from perl for the node binding I noticed a
test failed.
I basically create a document, add a few terms, add the document to a
database and then call doc->termlist_begin().get_termfreq(). This throws
"Can't get term frequency from a document termlist which is not associated
with a database."

What I think this means is that I can not call get_termfreq from a
TermIterator obtained from a document (this is only available for a
TermIterator obtained from a Database object). Am I right?

I will add code snippets if it is required.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20120709/d3ecc072/attachment.htm>

More information about the Xapian-devel mailing list