[Xapian-tickets] [Xapian] #271: Problem with OP_VALUE_LE and deleted document
Xapian
nobody at xapian.org
Tue Jun 3 13:28:04 BST 2008
#271: Problem with OP_VALUE_LE and deleted document
-----------------------------+----------------------------------------------
Reporter: versmisse | Owner: olly
Type: defect | Status: new
Priority: normal | Milestone:
Component: Xapian-bindings | Version: 1.0.6
Severity: normal | Keywords:
Blockedby: | Platform: All
Blocking: |
-----------------------------+----------------------------------------------
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.
--
Ticket URL: <http://trac.xapian.org/ticket/271>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list