[Xapian-tickets] [Xapian] #816: expand/ortermlist.cc:166:12: warning: duplicated 'if' condition
Xapian
nobody at xapian.org
Tue Oct 26 03:39:08 BST 2021
#816: expand/ortermlist.cc:166:12: warning: duplicated 'if' condition
--------------------+-------------------------------
Reporter: dcb | Owner: Olly Betts
Type: defect | Status: assigned
Priority: normal | Milestone: 1.4.19
Component: Other | Version: 1.4.17
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
--------------------+-------------------------------
Comment (by Olly Betts):
Replying to [comment:1 Olly Betts]:
> I think this could be triggered with a sharded database by getting a
`TermIterator` from `Database::spellings_begin()` or
`Database::synonyms_begin()` or `Database::synonym_keys_begin()` and
calling `skip_to()` on it.
I wrote a simple regression test using `Database::spellings_begin()` which
highlighted that the implementation of this method is just wrong -
currently it skips the left child or right child or both based on whether
the current positions are <, > or ==, but really it should skip both
whatever the current position order is. The current code will sometimes
fail to skip all the way to the requested new position.
--
Ticket URL: <https://trac.xapian.org/ticket/816#comment:3>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list