Description
A search with two colon leads to an TypeError. This two colon, I use offen for a MetaData search, with macros or directly from the search boxes. It should work with native xapian search (and not regex moinmoin slow search).
Steps to reproduce
Create a page with some MetaData (e.g. Key:: Data
And try to search for them via FullSearch
You will receive an TypeError, because of this ::
Example
Logfile
A FullText search for Wohnort:: Schweiz
2008-07-10 14:57:01,244 MoinMoin.search.queryparser DEBUG parse_quoted_separated items: [(u'Land', None, None), u'Schweiz'] 2008-07-10 14:57:01,252 MoinMoin.failure ERROR An exception occured. Traceback (most recent call last): File "/home/lotek/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1306, in run handler(self.page.page_name, self) File "/home/lotek/lib/python2.5/site-packages/MoinMoin/action/fullsearch.py", line 185, in execute titlesearch=titlesearch).parse_query(needle) File "/home/lotek/lib/python2.5/site-packages/MoinMoin/search/queryparser.py", line 1059, in parse_query query = self._analyse_items(items) File "/home/lotek/lib/python2.5/site-packages/MoinMoin/search/queryparser.py", line 1001, in _analyse_items elif "title".startswith(m): TypeError: expected a character buffer object
Component selection
- search
Details
MoinMoin Version |
1.7.0 (this Wiki) |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
use some quotes around the term "Key:: Data"
Discussion
- The title of this bug report is maybe a bit wrong; the error just comes from a search with two colons (::) and not specially from meta searches
That query is actually invalid because the query parser uses a colon to delimit prefixes like "regex:case:.*ABC". Therefore, you have to quote it.
thx! at least it works with quotes, but in near future, we should have a meta-data and meta-search features! All stuff about Meta Data is under MetaData saved, right?
Plan
- Priority:
- Assigned to:
- Status: fixed in a53e20c3ebab