3

After seeing this question, which I am in no was supporting, I thought the base problem could be solved by the ability to pull a list of questions based on tag-wiki for the game, since all of our game tags should have a tag-wiki that includes the genre of the game, among other things.

Is there a way to filter results to only the tags that have specific text in their tag-wiki? For example, searching for "RPG" would only return tags that include the word "RPG" in their tag-wiki.

1 Answer 1

2

There is no way to do this through the site itself. However, it can be done with the Data Explorer using this code:

Select (SELECT T.tagname FROM Tags T WHERE T.wikiPostId = Posts.Id), id as [Post Link], body from posts 
where lower(body) like lower('%##SearchTerm##%') and 0<(SELECT [count] FROM Tags T WHERE T.wikiPostId = Posts.Id) and
postTypeID = 5 /*wiki*/

union

Select (SELECT T.tagname FROM Tags T WHERE T.excerptPostId = Posts.Id), id as [Post Link], body from posts 
where lower(body) like lower('%##SearchTerm##%') and 0<(SELECT [count] FROM Tags T WHERE T.excerptPostId = Posts.Id) and
postTypeID = 4 /*excerpt*/

Run this query here. Input your search term in the box that appears when you run the query.

Note:

  • It will break if you try to search for certain special characters (but this can be avoided by replacing said character with the wildcard character, _).
  • Some tags will show up twice if the search term shows up in both the excerpt and the wiki. I don't feel like fixing this though :P
1

You must log in to answer this question.

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