Virgil Ierubino wrote:
I would really like to see a function like this developed into MediaWiki, either an an extension or into a new version. Put simply, one should be able to perform searches, limiting the field of search to articles in a given category. The reasons why this would be useful are probably obvious. If not
- the simplest one is just that categories split articles into topics - and
this would allow a user to search in a given topic.
I see two ways of enacting this, and I think both should be looked into. Firstly, an "advanced search" option, which I think is not as favourable. Secondly, and this is what I think would really be good, a search box automatically appears on a category page.
Alternatively, when one is viewing a category page, the normal search box (on the left) acquires a check box - "search in this category".
Additionally, a further checkbox could be interesting: "also search subcategories".
I can't imagine this would be too difficult to implement, but would certainly be very useful and would make more use of the categorisation system in MediaWiki.
Category search could be implemented fairly easily using Lucene fields. But I think the results would be counterintuitive unless subcategories were included by default, and that's rather more difficult to implement. A top-level category in Wikipedia does not contain a collection of articles on that topic, it contains a list of subcategories and a few miscellaneous articles.
To implement subcategory search, MW could recursively load parent categories on page save, and put them in a "parent category" lucene field. Circular reference detection and resource limits would have to be in place.
-- Tim Starling