Advanced Search with multiple categories
On MoinMoin 1.9.8 the <<AdvancedSearch>> macro (used on FindPage) supports selecting multiple categories but it seems it doesn't work as one would expect. (I haven't find any documentation on this feature and so I can't say if it is a bug actually.)
If you select only one category the search is successful. But if you select multiple categories, which is possible with Ctrl + click, you get an error message saying that the search query didn't return any results.
First of all, selecting multiple categories could have two meanings:
you want to find pages belonging to all of the selected categories (logical AND of all selected categories)
you want to find pages belonging to any of the selected categories (logical OR of all selected categories)
Currently, if you selected two categories, the search query contains category:CategoryCat1,CategoryCat2 which doesn't correspond to any of the two possible meanings.
To get the right result, the search query should contain either of the following two:
(category:CategoryCat1 category:CategoryCat2) for the first meaning
(category:CategoryCat1 OR category:CategoryCat2) for the second meaning
If you enter any of these search queries manually they work fine.
The macro should be improved so that you can search for pages belonging to all/any of the selected categories (the choice between "all" and "any" should be made with an option).
I had a look at MoinMoin/macro/AdvancedSearch.py but my knowledge of Python is not sufficient to make necessary changes. -- rpr 2015-01-19 18:22:56
Looks like a bug...
In general, supporting OR is not strictly necessary, you can usually get all what you wanted to find by running multiple searches instead of one with OR.
Supporting AND for categories may make sense, IF you have pages in mulptiple categories and you only want to find the pages in category X AND Y.
This bug also exists in MoinMoin 1.9.9. -- rpr 2016-11-29 18:09:53