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

  1. Install or upgrade to Xapian 1.2 (or later, I suppose) while choosing or keeping Moin 1.8.
  2. Attempt to perform Xapian-based searches.

Example

This is a software configuration issue.

Component selection

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:

I am not sure whether this is true, but the patch assigns the document according to the advice given, anyway.

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/1.8XapianSearchingFailsWithUnindexableObject (last edited 2013-07-24 09:57:32 by PaulBoddie)