Ticket #82 (closed defect: released)
Existing values are not update by document.add_value()
| Reported by: | mdt | Owned by: | olly |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Library API | Version: | 0.9.5 |
| Severity: | normal | Keywords: | |
| Cc: | Blocked By: | ||
| Operating System: | Linux | Blocking: |
Description
If I call add_value on an existing value without calling remove first the value is not changed when the document is replaced (per add_value documentation)
Xapian::Document doc = db.get_document(1); string oldstr = doc.get_value(0); // "1111111111" is returned string newstr = "1112223334"; doc.remove_value(0); // without this remove the value is not replaced doc.add_value(0, newstr); db.replace_document(1, doc); db.flush();
// Query doc 1. Without the remove_value call "1111111111" is returned
Additional Info
Fedora Core 5, Flint Backend
Change History
Note: See
TracTickets for help on using
tickets.
