Xapian2009 code: queryparser xapian_term was refactored for the title search
queryparser.TitleSearch.xapian_term was refactored. Xapian.Index.prefixMap attribute was removed. http://hg.moinmo.in/moin/1.9-xapian-dmilajevs/rev/0603dfa4cc49
We seem to have a problem in the database, please can you check this. And may be also add something similiar as a test.
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 import xappy
4 from MoinMoin.web.contexts import ScriptContext
5 request = ScriptContext()
6
7 from MoinMoin.search.Xapian import MoinSearchConnection
8 index_dir = 'wiki/data/cache/xapian/index'
9 conn = xappy.SearchConnection(index_dir)
10
11 hits = MoinSearchConnection(conn).get_all_documents()
12 print len(hits)
moin-1.9-xapian-dmilajevs$ ./debug_xapian1.py
gives
2009-08-09 12:09:12,178 WARNING MoinMoin.log:139 using logging configuration read from built-in fallback in MoinMoin.log module! 2009-08-09 12:09:12,451 INFO MoinMoin.config.multiconfig:127 using wiki config: /home/user/workspace/moin-1.9-xapian-dmilajevs/wikiconfig.py Traceback (most recent call last): File "./debug_xapian1.py", line 11, in <module> hits = MoinSearchConnection(conn).get_all_documents() File "/home/user/workspace/moin-1.9-xapian-dmilajevs/MoinMoin/support/xappy/searchconnection.py", line 741, in __init__ self._index = _log(_xapian.Database, indexpath) File "/home/user/workspace/moin-1.9-xapian-dmilajevs/MoinMoin/support/xappy/replaylog.py", line 413, in log return call(*args) File "/usr/lib/python2.6/dist-packages/xapian.py", line 2408, in __init__ _xapian.Database_swiginit(self,_xapian.new_Database(*args)) TypeError: in method 'new_Database', argument 1 of type 'std::string const &'
replacing MoinSearchConnection(conn).get_all_documents() works
You should pass index_dir to the MoinSearchConnection()