Description

Xapian content indexing raise some errors, while indexing some macros like: <<PageList()>> and <<FullSearchCached()>> (in pages HelpIndex and CategoryCategory).

Steps to reproduce

  1. create a wiki
  2. Add those instruction in the config file:

        xapian_search = True
        xapian_stemming = True
  3. Execute moin index build --wiki-url=http://localhost/wiki --mode=add

Example

short log:

2010-05-05 07:48:09,508 ERROR MoinMoin.macro:132 Macro PageList (page: 'HelpIndex') raised an exception:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/MoinMoin/macro/__init__.py", line 122, in execute
    return execute(self, args)
  File "/usr/lib/pymodules/python2.5/MoinMoin/macro/PageList.py", line 32, in execute
    sort='page_name')
  File "/usr/lib/pymodules/python2.5/MoinMoin/search/__init__.py", line 35, in searchPages
    return _get_searcher(request, query, sort, mtime, historysearch, **kw).run()
  File "/usr/lib/pymodules/python2.5/MoinMoin/search/builtin.py", line 262, in run
    hits, estimated_hits = self._search()
  File "/usr/lib/pymodules/python2.5/MoinMoin/search/Xapian/search.py", line 53, in _search
    search_results = index.search(self.query, sort=self.sort, historysearch=self.historysearch)
  File "/usr/lib/pymodules/python2.5/MoinMoin/search/builtin.py", line 135, in search
    return self._search(query, **kw)
  File "/usr/lib/pymodules/python2.5/MoinMoin/search/Xapian/indexing.py", line 183, in _search
    hits = searcher.search(query, 0, document_count, **kw)
  File "/usr/lib/python2.5/site-packages/xappy/searchconnection.py", line 1635, in search
    raise _errors.SearchError("Field %r was not indexed for sorting" % sortby)
SearchError: Field 'pagename' was not indexed for sorting

(click on comment for more)

Component selection

Details

MoinMoin Version

1.9 from Debian + some HG patches

OS and Version

DebianSqueeze

Python Version

2.5

Server Setup

WSGI

Server Details

Xapian

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

Workaround

Discussion

Hmm, looks a bit like you try to update an invalid index.

Could you try to (quoting from docs/CHANGES):

moin index build --mode=buildnewindex
<stop wiki>
moin index build --mode=usenewindex
<start wiki>

AFTER this, try to reproduce the problem.

Can you please look at the raw text of the pages you got this error. Make sure it is the uptodate underlay page of that content. (compare it with http://master19.moinmo.in/HelpIndex?action=raw)

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/1.9XapianErrorsIndexingSomeMacros (last edited 2010-08-26 22:42:31 by ReimarBauer)