Description
If you are using CamelCase SubPages the xapain search (e.g. PageList) is not working correctly.
Steps to reproduce
created some pages:
- TestOfSubPages/unterseite1/Unterseite2/Unterseite3c
- TestOfSubPages/unterseite1/Unterseite2/Unterseite3b
- TestOfSubPages/unterseite1/Unterseite2/Unterseite3a
- TestOfSubPages/unterseite1
- TestOfSubPages/unterseite1/Unterseite2
And a PageList with Xapian for
<<PageList(TestOfSubPages)>>
will display only the main page, and missed the subpages at all!
if you use some regex like
<<PageList(regex:TestOfSubPages)>
then it will display all results (due with regex xapian is not used)
Example
Visit my HomePage under: http://lotek.heavy.ch/TestOfSubPages
Component selection
- xapian
Details
MoinMoin Version |
1.6.3 (revision 2d93262ebc21 |
OS and Version |
Linux |
Python Version |
2.5.2 |
Server Setup |
WSGI with Apache2 |
Server Details |
Xapian 1.0.4 and PyStemmer 1.0.1 |
Language you are using the wiki in (set in the browser/UserPreferences) |
de |
Workaround
don't use numbers for SubPages
Discussion
my latest test shows, that this happens only if you are using a CamelCase page name like: SingleSubPage - if you are writing your page like singlesubpage then xapain is working... -- MarcelHäfner 2008-05-20 19:07:44
can't reproduce on 1.7dev -- ThomasWaldmann 2008-05-22 19:32:46
I found out that on my 1.6. (xapian and pystemmer) it's only ocure if I use numbers in subpage names. If you use only words there is no problemo. See here http://lotek.heavy.ch/TestOfSubPages/SubPage1 subpages with TestOfSubPages/UnderPage/OnePage/SecondPage will be found subpages with TestOfSubPages/SubPage1/SubPage2/SubPage3c not. -- MarcelHäfner 2008-05-24 11:15:56
is the fix for 1.7. here MoinMoinBugs/TitleSearchDoesNotWorkWhenPageNameIsLowerCaseCharactersOneWord?
- try the workaround shown there.
I just installed a Moin 1.7 (from the latest changeset changeset 3639 - 776b338ccc2d) and still SubPages with numbers not shows up (with the Macro PageList). Only if you using re: to search with regex and using the slow search, then every wanted subpages shows up. Maybe it's because of stemming words (using pystemmer 1.0.1 with xapian 1.0.5) SubPagesWithNumbersDontWork.png I believe/think that the workaround (disable stemmers) could work, but stemming is needed, due missing wildcard search. bye -- MarcelHäfner 2008-05-24 14:51:40
Plan
- Priority:
- Assigned to:
Status: caused by a crappy "num" regex in the WikiAnalyzer of the xapian indexer, fixed by http://hg.moinmo.in/moin/1.7/rev/e54b2e843990
Note: the WikiAnalyzer can get some more improvements.
It handles:
- yield fullword
CamelCase -> yield Camel, yield Case
ab12 -> yield ab, yield 12
Foo1Bar2 > yield Foo, 1, Bar, 2
It could also handle:
a_b -> yield a, yield b
Other ideas:
ab.12 -> yield ab, yield 12, yield ab.12 (only letters like Version.Alpha works)
- or maybe everything what is not alphabetic character, should count as a delimiter
Feedbacks:
the PageList displays also subpages with numbers, now (on 1.7 and also I could apply your patch to 1.6, thx!)
- an issue on my test wiki 1.7, is that it works only if you create or edit the page; a index rebuild doesn't worked on my 1.7 (it's like you rebuild the index and the page disappears; do editing/change some subpages the pages get displayed...) It looks like only page editing write the correct data to the index and rebuild is using some other/old function. BUT hey; don't hurry - maybe it's also because my buggy test installation (I will try to make a fresh test environment till end of this week).
- on 1.6 everything works fine (even after a index rebuild)
Another Problem:
A xapian search with the term "Version" for pagename like "Version17" or "Version1.7" doesn't work. So should I wait for a "good soul" or write another bug report (and then waiting for a good soul
) anyway thanks for your fast bug killing, bye -- MarcelHäfner 2008-05-26 12:00:36
- should be fixed now