Description

The extended search based on Xapian does not work on Windows in moin-1.6.0.

Various windows-specific problems:

Steps to reproduce

  1. Build Xapian core and python wrappers and install
  2. Run Xapian index with moin script
  3. "Cannot import symlink" error
  4. os.utime(self.dir, None) exception
  5. IOError: [Errno 24] Too many open files

Example

Component selection

Details

MoinMoin Version

1.6dev

OS and Version

XP

Python Version

2.5

Server Setup

n/a

Server Details

n/a

Language you are using the wiki in (set in the browser/UserPreferences)

English

Workaround

Discussion

Moin IRC discussion today suggested recording bug at divmod for XapWrap, but this is no longer maintained and one developer said that they are now looking at PyLucene and fts2 (for SQLite).

<!> Not ideal to have a dependency on obsolete code for a new Moin indexer, particularly when it constrains implementation to posix only.

Faster indexing is definitely required for larger wikis (mine has 17,000 + pages)


I have implemented a cygwin-like symlink and readlink to further test and I now find it falls over in the Index method of Xapian.pg on self.touch() where it is trying to touch the index directory with os.utime(self.dir, None).

Unfortunately os.utime does not seem to be implemented for directories on windows either.

Commented out self.touch() to test further and indexer fell over with IOError: [Errno 24] :

Traceback (most recent call last):

IOError: [Errno 24] Too many open files: 'd:\\DOCUME~1\\tijo2\\MYDOCU~1\\moin\\data\\pages\\datareports_entityreport_130567(2e)htm\\revisions\\00000001'

Will run again under debug to see if I can locate the files which are not being closed.


I (DavidLinke) have also tried to use Xapian-1.0.4 with moin-1.6.0 Release with Python 2.5.1 on Windows XP (server: Apache/CGI). Out of the box it does not work due to the problem with locking in xapwrap on Win32 mentioned above. I applied http://divmod.org/trac/ticket/504 - It did not help much. Just produced a different error:


Well, I needed to get this working for an Intranet site and did some hacking and it now works. I did not run into the "too many files error", but I did the others. Thanks to DavidLinke for the pointer to fix the symlink problem. The missing support for utime in Windows was another matter, but I was able to fix that as well. Not being familiar with how to submit patches here, I've attached a patch file to this page.

FixXapianOnWindows.patch

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.6DevXapianNoWin32Symlink (last edited 2008-03-23 16:26:51 by ThomasWaldmann)