Description
A regex Full(Text)search raise an error like:
search instance has no attribute '_xapianMset'
Steps to reproduce
Update to MoinMoin 1.6.1
Try some regex FullText search like regex:test*
An normal FullText Search works
MoinMoin Server Log
779 2008-02-05 12:30:23,221 INFO 127.0.0.1 "GET /Index?action=fullsearch&context=180&value=regex%3Atest*&fullsearch=Text HTTP/1.1" 500 - 780 2008-02-05 12:30:23,222 ERROR AttributeError: Search instance has no attribute '_xapianMset' 781 Traceback (most recent call last): 782 File "/home2/lotek/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1283, in run 783 handler(self.page.page_name, self) 784 File "/home/lotek/lib/python2.5/site-packages/MoinMoin/action/fullsearch.py", line 187, in execute 785 results = searchPages(request, query, sort, mtime, historysearch) 786 File "/home/lotek/lib/python2.5/site-packages/MoinMoin/search/__init__.py", line 33, in searchPages 787 historysearch=historysearch).run() 788 File "/home/lotek/lib/python2.5/site-packages/MoinMoin/search/builtin.py", line 472, in run 789 mset = self._xapianMset 790 AttributeError: Search instance has no attribute '_xapianMset'
Example
--> -->
AttributeError
Search instance has no attribute '_xapianMset'
If you want to report a bug, please save this page and attach it to your bug report.
Traceback
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home2/lotek/lib/python2.5/site-packages/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_standalone.Request object at 0xae2831ac>)
- 1281 self.page.send_page(msg=msg)
- 1282 else:
- 1283 handler(self.page.page_name, self)
- 1284
- 1285 # every action that didn't use to raise MoinMoinNoFooter must call this now:
- handler = <function execute at 0xae2a3b1c>
- self = <MoinMoin.request.request_standalone.Request object at 0xae2831ac>
- self.page = <MoinMoin.Page.Page object at 0xae1fa64c>
- self.page.page_name = u'SystemInfo'
/home/lotek/lib/python2.5/site-packages/MoinMoin/action/fullsearch.py in execute (pagename=u'SystemInfo', request=<MoinMoin.request.request_standalone.Request object at 0xae2831ac>, fieldname='value', titlesearch=0, statistic=0)
- 185 query = QueryParser(case=case, regex=regex,
- 186 titlesearch=titlesearch).parse_query(needle)
- 187 results = searchPages(request, query, sort, mtime, historysearch)
- 188 except ValueError: # catch errors in the search query
- 189 err = _('Your search query {{{"%s"}}} is invalid. Please refer to '
- results undefined
- searchPages = <function searchPages at 0xae2a3d14>
- request = <MoinMoin.request.request_standalone.Request object at 0xae2831ac>
- query = <MoinMoin.search.queryparser.TextSearch instance at 0xae1fa9ec>
- sort = 'weight'
- mtime = None
- historysearch = 0
/home/lotek/lib/python2.5/site-packages/MoinMoin/search/__init__.py in searchPages (request=<MoinMoin.request.request_standalone.Request object at 0xae2831ac>, query=<MoinMoin.search.queryparser.TextSearch instance at 0xae1fa9ec>, sort='weight', mtime=None, historysearch=0, **kw={})
- 30 if isinstance(query, str) or isinstance(query, unicode):
- 31 query = QueryParser(**kw).parse_query(query)
- 32 return Search(request, query, sort, mtime=mtime,
- 33 historysearch=historysearch).run()
- 34
- historysearch = 0
- ).run undefined
/home/lotek/lib/python2.5/site-packages/MoinMoin/search/builtin.py in run (self=<MoinMoin.search.builtin.Search instance at 0xae1fa72c>)
- 470 self.request.cfg.xapian_search:
- 471 self.sort = None
- 472 mset = self._xapianMset
- 473 estimated_hits = (
- 474 (mset.get_matches_estimated() == mset.get_matches_upper_bound()
- mset undefined
- self = <MoinMoin.search.builtin.Search instance at 0xae1fa72c>
- self._xapianMset undefined
AttributeError
Search instance has no attribute '_xapianMset'
- args = ("Search instance has no attribute '_xapianMset'",)
- message = "Search instance has no attribute '_xapianMset'"
System Details
- Date: Mon, 04 Feb 2008 11:02:57 +0000
- Platform: Linux web11.webfaction.com 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 12 17:59:08 EDT 2007 i686
- Python: Python 2.5 (/home/lotek/bin/python)
- MoinMoin: Release 1.6.1 (release)
Component selection
- Xapian Fulltextsearch
Details
MoinMoin Version |
1.6.1 |
OS and Version |
Linux |
Python Version |
2.5.1 |
Server Setup |
MoinServer Standalone |
Server Details |
Xapian 1.0.4 |
Language you are using the wiki in (set in the browser/UserPreferences) |
DE |
Workaround
- disable xapian
Discussion
I get the same error running Python 2.4.3, MoinMoin 1.6.1, Xapian 1.0.4, RHEL 5, clean install using EN. --counterpoke
Me too, on Debian Etch, MoinMoin 1.6.2, Python 2.4.4-2, libxapian13 0.9.9-1, python-xapian 0.9.9-1.1 -- EricVeirasGalisson 2008-04-04 13:10:06
Me too, on JeOS 8.04, Moin 1.6.3, python 2.5.2, libxapian15 (1.0.5-1_i386), python-xapian (1.0.5-1_i386), no pystemmer, /TraceBackRemcoBoerma -- RemcoBoerma 2008-04-29 13:27:44
Found it
in search/bulitin.py line 470:
into:
As xapian search isn't allways used for searching, even when configured. When using a Regular expression for example, xamian seach is not used.
Plan
- Priority:
- Assigned to:
Status: fixed by http://hg.moinmo.in/moin/1.6/rev/23982c6fbb4c and http://hg.moinmo.in/moin/1.7/rev/7e4b68c11362