rr- / szurubooru

Image board engine, Danbooru-style.
GNU General Public License v3.0
689 stars 174 forks source link

Feature request: token to expand search to implications/suggestions of tags #208

Open FoxxMD opened 5 years ago

FoxxMD commented 5 years ago

It would be great if I could expand a query by using a token to signal that I want to search by tag X, and also any suggested/implicated tags for tag X.

sgsunder commented 5 years ago

I don't understand what you mean by this. Can you describe an example case?

FoxxMD commented 5 years ago

I have a tag garak for the character Garak from Deep Space Nine.

image

If I query for just garak I'm only going to get 6 results. But the tag has many more implications and suggestions attached to it. I would like to expand my query to these other tags without having to explicitly include them.

So I would love to be able to use named tokens to do this:

qwertie64982 commented 3 years ago

It would also be super helpful in certain situations to go the other way! One such situation: what if we want to make a change to every character in DS9? Or, what if we want to search for duplicate characters?

The query in English would be something like "Find me all the tags that imply DeepSpaceNine."

Based on a quick look in the migrations, luckily it seems tags keep track of both their children and parents.

sgsunder commented 3 years ago

"Find me all the tags that imply DeepSpaceNine."

Can you give a real-world example of when you would want this, but when searching deep_space_nine directly wouldn't work?

Same way in reverse: If you want to search all the implied tags for garak (implications:garak), why wouldn't a user just search the broadest applicable tag (star_trek)? Wouldn't the results be identical?

qwertie64982 commented 3 years ago

I've found that these features would be extremely helpful when editing tags. Especially since #189 is marked wontfix, it's currently really difficult manage multiple tags.

Real-world example: Consider that the tags garak, sisko, odo, bashir... imply DeepSpaceNine. What if I want to add a tag that a subset of these imply? For example, human is implied by bashir, sisko and not odo, garak. The only way to do this right now is extremely tedious, since there's no way for me to search the things that imply DeepSpaceNine.

FoxxMD commented 3 years ago

@sgsunder your example assumes the user searching has expert knowledge about star trek. My real-world example/use case is:

Imagine a user who is using szurubooru for the first time and does not know much about star trek. They go to search but don't realize that clicking into a post shows them all tags. They search for "picard forehead" because its a well known meme and it returns that meme, but that's all. All of the other tags associated (star trek, garak, odo, deepspacenine) don't show up even though they are suggestions or implications of picard .

Instead, with this feature, when they visit my szurubooru instance I tell them "when you search add implies: before your search" and so they search for implies:picard forehead and the results return picard forehead star_trek deepspacenine garak... and they get a much broader set of memes back that they never would have known to look for without the implies: tag.