Description
When attempting to display Xapian search results in Moin 1.8 with Xapian 1.2 (and the accompanying Python bindings), Moin produces an error referring to an unindexable object (see below). The cause of this is described in the following Xapian ticket:
http://trac.xapian.org/ticket/531
Steps to reproduce
- Install or upgrade to Xapian 1.2 (or later, I suppose) while choosing or keeping Moin 1.8.
- Attempt to perform Xapian-based searches.
Example
This is a software configuration issue.
Component selection
- Xapian/xapwrap
Details
In the error below, the offending line is number 679.
TypeError 'MSetItem' object does not support indexing 677 for m in mset: 678 thisResult = {} 679 thisResult['uid'] = m[xapian.MSET_DID] 680 thisResult['score'] = m[xapian.MSET_PERCENT] 681 if valuesWanted: thisResult = {} m = <xapian.MSetItem object> global xapian = <module 'xapian' from '/usr/lib/python2.7/dist-packages/xapian/__init__.pyc'> xapian.MSET_DID = 0
MoinMoin Version |
1.8 |
OS and Version |
Debian Wheezy |
Python Version |
2.7 |
Server Setup |
Apache |
Server Details |
CGI |
Language you are using the wiki in (set in the browser/UserPreferences) |
English |
Workaround
Apply the patch-xapwrap-Xapian-1.2.diff and see if it fixes the problem.
Discussion
The Xapian ticket makes the following claim:
- Looking into this has turned up another issue - we didn't had a feature test for the MSET_* stuff. I've now added one, but it turns out MSET_DOCUMENT doesn't work, as the element of the tuple it refers to is never set!
I am not sure whether this is true, but the patch assigns the document according to the advice given, anyway.
Plan
- Priority:
- Assigned to:
- Status: