5

I want to search for two tags simultaneously using the /questions/tagged/<tag list> search method, and allow one tag to be a wildcard. Is this possible?

For example when searching for Actionscript mocking questions with the query https://stackoverflow.com/questions/tagged/actionscript%20mock* seems to be resolved, per the page <title> and sidebar as:

Highest Voted 'actionscript mocking or mockito or mockups or mockup-tool or mocking-framework or mockrunner or mockolate or mockrepository or mockme or mockjax or mockery' Questions - Stack Overflow

enter image description here

which returns loads of irrelevant results.

Presumably the wildcard is being expanded before building the predicate tree which is resulting in this unexpected behaviour.

Are there any ways to get around this behaviour at present?

5
  • Reproduced in Chrome 14 on Windows XP on SO, MSO, and SE 2.0. Oct 20 '11 at 12:19
  • Seems related to this post on theoretical CS, but I can't find the implementation details on MSO. Oct 20 '11 at 15:41
  • I've pinged Sam about this on that theoretical CS post, he should respond here (or he'll reply to me and I'll respond here) with more information. Oct 20 '11 at 19:47
  • having a think about this, we can change the precedence of the tag expantion @KevinVermeer
    – waffles
    Oct 21 '11 at 4:41
  • Thanks for all your investigation and input @Kevin! Oct 21 '11 at 14:02
2

Searching for [actionscript] ( [mock*] ) (note the parentheses and the spaces!) does the trick. For a Meta SE example, this search gives all questions which have both and any tag matching the wildcard [badge*].

The parentheses appear to corral all of the wildcard's "or" expansion, and then the default "and" search kicks in to find the intersection of the first tag and the parentheses' expression. The space between the open parenthesis and the open square bracket keeps the wildcard search from being interpreted as text. (The space between the closing bracket and parenthesis is because I like symmetry; it can safely be removed.)

This does end up using /search instead of /tagged, but it has exactly the effect you're after.

1

Searching for [actionscript] mock* seems to return any question with having the mock* as the search condition

https://stackoverflow.com/search?q=%5Bactionscript%5D+mock*

2
  • This is what I thought at first until I read more carefully. This answer is unrelated to the question; you're using /search?q=<tag list> and the question is about wildcard and logical operator functionality in /questions/tagged/<tag list>. Oct 20 '11 at 15:29
  • For example, /questions/tagged/embedded c arm returns a list of questions tagged with [embedded] AND [c] AND [arm]. I'm not sure how to invoke the OR operator. Oct 20 '11 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .