Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I'm trying to search for a keyword within a specific category on Wikimedia Commons. For example, like to search for "red flowers" within "Category:Flowers" so that I can categorize the images accordingly.

If this can't be done on Wikimedia Commons, is it possible to do this on other MediaWiki websites?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

This is possible on Wikimedia Commons.

Can I specify categories when searching?

[...] To do this, just add +incategory:"CategoryName" to the search string. [...]

For example, if you wanted to look for the purple things in the "Flowers" category, you'd use this:

purple +incategory:"Flowers"

Be warned that if you're trying this on a default or fresh install of a MediaWiki site, it may not work since it's a Lucene search specific function that needs setting up.

share|improve this answer
    
This actually works - thanks! –  Anderson Green Jul 29 '12 at 22:07
    
can you provide a link to doc on how Lucene search syntax extensions? The linked page and their linked doc pages (which they admit are sparse and old) do not mention category or incategory search at all. –  djb Apr 17 '13 at 20:11
    
Find it in the first link in this answer, which is en.wikipedia.org/wiki/Wikipedia%3aFAQ/… @djb –  Eight Days of Malaise Apr 25 '13 at 4:03

As far as I know, MediaWiki's standard installation does its search on the page syntax. So you may simply combine your key word with the category definition in parantheses:

keyword "[[Category:keycategory]]"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.