Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#271 closed defect (fixed)

Problem with OP_VALUE_LE and deleted document

Reported by: Versmisse David Owned by: Olly Betts
Priority: normal Milestone: 1.0.7
Component: Xapian-bindings Version: 1.0.6
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

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 (2)

comment:1 by Richard Boulton, 16 years ago

Resolution: fixed
Status: newclosed

This issue is fixed in SVN (both in the 1.0 branch, and on trunk). The fix will be in the 1.0.7 release. I've just added a note to the wiki:ReleaseNotes/1.0.6 page about this.

comment:2 by Richard Boulton, 16 years ago

Milestone: 1.0.7
Note: See TracTickets for help on using tickets.