Ticket #271 (closed defect: fixed)
Problem with OP_VALUE_LE and deleted document
| Reported by: | versmisse | Owned by: | olly |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.7 |
| Component: | Xapian-bindings | Version: | 1.0.6 |
| Severity: | normal | Keywords: | |
| Cc: | Blocked By: | ||
| Operating System: | All | Blocking: |
Description
Hello, i have a small problem with a Query and OP_VALUE_LE. Here, an example:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from xapian import (WritableDatabase, DB_CREATE_OR_OPEN, Document, Query, Enquire, sortable_serialise, sortable_unserialise)
db = WritableDatabase('my_db', DB_CREATE_OR_OPEN)
doc1 = Document()
doc1.add_posting('foo1', 0)
doc1.add_value(0, sortable_serialise(1.0))
doc2 = Document()
doc2.add_posting('foo2', 0)
doc2.add_value(0, sortable_serialise(2.0))
db.add_document(doc1)
db.add_document(doc2)
db.delete_document('foo1')
enquire = Enquire(db)
enquire.set_query(Query(Query.OP_VALUE_LE, 0, sortable_serialise(1.5)))
for doc in enquire.get_mset(0,10):
print sortable_unserialise(doc.get_document().get_value(0))
This code stops with a: xapian.DocNotFoundError?: Document 1 not found.
Thanks you in advance for your answer.
Best regards, David Versmisse.
Change History
Note: See
TracTickets for help on using
tickets.
