[Xapian-tickets] [Xapian] #423: Document termlist get_termfreq() method behaviour depends on whether terms are cached
Xapian
nobody at xapian.org
Thu Dec 7 04:16:48 GMT 2023
#423: Document termlist get_termfreq() method behaviour depends on whether terms
are cached
-----------------------------+-------------------------------
Reporter: Richard Boulton | Owner: Olly Betts
Type: defect | Status: closed
Priority: normal | Milestone: 1.5.0
Component: Library API | Version: SVN trunk
Severity: normal | Resolution: fixed
Keywords: | Blocked By:
Blocking: | Operating System: All
-----------------------------+-------------------------------
Changes (by Olly Betts):
* status: new => closed
* resolution: => fixed
Comment:
> Overall I think it's best to resolve this part by documenting that the
TermIterator here only knows about the shard (effectively the Document
object only knows about the shard it is in since get_docid() reports the
docid in the shard, so this is reasonably consistent). If you really want
the termfreq from the full database then you can keep a reference to it
and call db.get_termfreq(*term_iterator).
Documented in ed5be3aee549cd295474ebe497f2a8512bb82f5e.
Backported for 1.4.25 in 5f8be092464b5649225dfc3a41850ef2ee334f39.
I've also adjusted testcases adddoc2 and adddoc5 to run for sharded
databases, but to skip the `TermIterator::get_termfreq()` checks in
66a48b1ee0122cc15e73d71ded2fff02de5edb6e, backported in
f9c8141a3074f215ee912bd17e13c8471ae100d6.
--
Ticket URL: <https://trac.xapian.org/ticket/423#comment:9>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list