I'm fairly positive that there is no way to do this with the advanced search (and I support the addition of a tag count as a search operator, although I don't strongly support it as it ideally should be rare and is a relatively unusual use case), however, in the mean time, you can do this through SEDE if you don't mind the data being up to a week old (it's updated weekly), by using the Tags
field in Posts
, which is a list of tags enclosed in angle brackets:
SELECT TOP 50
Id [Post Link], Tags, *
FROM
Posts
WHERE
Tags = '<java>' -- Tag name (case-sensitive) inside <>'s
ORDER BY
CreationDate DESC
You can also do a join on PostTags
and Tags
then search by Tags.TagName
but the query becomes more complex to look for posts with just a single tag.
To make it more reusable you can use a parameter field for the tag name, for example in this query just type the tag name in the box below the query then press Run Query.
Replace Tags = '<java>'
with Tags LIKE '%<java>%'
to get any post with that tag instead of posts with just that tag.
Also, if you want to find any question with just one tag, regardless of the tag, you can use a query like this:
SELECT TOP 50
Id [Post Link], Tags, *
FROM
Posts
WHERE
LEN(Tags) - LEN(REPLACE(Tags, '<', '')) = 1 -- # of <'s = # of tags
ORDER BY
CreationDate DESC
An alternate trick in the case of just one tag is Tags NOT LIKE '%><%'
.
More complete docs on the SEDE schema can be found here.