Description
A wildcard-Search for title or fulltext is not working with the MoinMoin Xapian Engine 1.0.4 (even with a trailing '*' wildcard).
Test
Doing a normal search like HelpOn
TitleSearch - Result: 0
Xapian searches for complete indexed words. Because of that this search is a problem.
Doing a search with a trailing * like HelpOn*
TitleSearch with a Star - Result: 0
because we don't support wildcard searches
But; if you doing some regex like regex:HelpOn*
TitleSearch with REGEX - Result: 111 Results
because for regex: it falls back to non-xapian search (btw, that regex is not doing what you expect, correct would be HelpOn.*.
If you switch back to normal MoinMoin Search everything works as excepted.
Component selection
MoinMoin Xapian Search
The Xapian::QueryParser should be able to do a Wildcard-Search, you mee need to set the FLAG_WILDCARD somewhere... (right?)
The QueryParser supports using a trailing '*' wildcard, which matches any number of trailing characters, so wildc* would match wildcard, wildcarded, wildcards, wildcat, wildcats, etc. This feature is disabled by default - pass Xapian::QueryParser::FLAG_WILDCARD in the flags argument of Xapian::QueryParser::parse_query(query_string, flags) to enable it, and tell the QueryParser which database to expand wildcards from using the QueryParser::set_database(database) method.
http://www.xapian.org/docs/queryparser.html
We don't use the xapian query parser, but a own queryparser (that is used for both slow non-indexed and xapian indexed search).
Details
MoinMoin Version |
Version 1.6.0 [Revision release] |
OS and Version |
Red Hat 3.4.6-3 |
Python Version |
2.5 (r25:51908, Mar 19 2007, 07:40:18) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] |
Server Setup |
|
Server Details |
Xapian-Version 1.0.4 / PyStemmer Version 1.0.1 |
Language you are using the wiki in (set in the browser/UserPreferences) |
DE |
... more details if needed here
Xapian Version
The Latest Xapian Search is 1.0.5 but I do not believe that this has something ToDo with the Version. Well I think you should use atleast the Version 1.0!
May check the Release Notes:
http://svn.xapian.org/tags/1.0.5/xapian-bindings/NEWS?view=co
http://svn.xapian.org/tags/1.0.5/xapian-applications/omega/NEWS?view=co
Workaround
You need to do some regex lilke regex:HelpOn*
http://rock.heavy.ch/?action=fullsearch&context=180&value=regex%3AHelpOn*&titlesearch=Titel
Or just not using Xapian Search
Discussion
confirmation
I confirm the problem on MoinMoin 1.6.2 with libxapian13 version 0.9.9-1 and python-xapian 0.9.9-1.1 on Debian Etch. -- EricVeirasGalisson 2008-04-04 12:37:19
Plan
- Priority:
- Assigned to:
- Status: this is not a bug (but you can see it as missing feature if you like)