Notice: My personal stance on AI generated artwork. Retweet and share if you agree. Let us discuss, and not immediately scream bloody murder.

Now Viewing: Tag search with Boolean "or" - why it's so important
Keep it civil, do not flame or bait other users. If you notice anything illegal or inappropriate being discussed, contact an administrator or moderator.

Meem0 - Group: Member - Total Posts: 6
user_avatar
Tag search with Boolean "or" - why it's so important
Posted on: 04/17/16 07:12PM

Gelbooru is awesome, but it is severely missing out on "or" searching. In this post I want to explain just how useful it is. I know it's on the issue tracker, but maybe its priority can be raised a bit ;)

ibsearch.xxx/ has a wonderful searching system that includes "or", but the site is unusably slow. Maybe you'll say "the proof's in the pudding"... but I'm sure it can be implemented without running the site into the ground. Like, if you had an option to perform a search on a daily updated cache of the tag list, and you can only do advanced searches on the cached mode.

Anyway, here's why it's such a game-changer:

Want doggystyle with hand or arm holding? That sucks, there are at least three different tags. With "or" searching:
doggystyle (arm_held_back | arm_grab | hand_holding)

Want some sort of "lingerie sleepwear" with boobage? Too bad, there are about 4 tags for that type of attire. With "or" searching:
cleavage (negligee | nightgown | babydoll | chemise)

And here's my personal best example. I really like "fantasy"-type characters (princesses, valkyries, priestesses, etc.) that have a nice touch of ecchi to them, like some cleavage or a short skirt or whatever. Unfortunately that's a really nebulous concept. Well, here's my monstrous, glorious solution that I've used very successfully on ibsearch:
(skirt | dress | thighhighs | gloves) (bare_shoulders | zettai_ryouiki | cleavage | side_slit | panties) (armor | circlet | fantasy | pointed_ears | staff | tiara | wand | weapon)

The first group of tags ensures the character is wearing some actual clothing. The second group gives you some ecchi. And the third is asking for any "fantasy" element. I also add -dragon's_crown -mahou_shoujo_madoka_magica to the end, or they dominate the results. It's not perfect: you could get a man in a tanktop (bare_shoulders) with gloves on holding a gun (weapon), but about 80% of the images end up being exactly what I'm looking for.

You can probably see by now how much depth boolean "or" adds to tag searching.

But here's advanced mode: weighted tag searching.

Let's say I want a sexy chick in a kimono / yukata type thing. "japanese_clothes", okay. Well it would be nice if she could be in an onsen, those are pretty. And it's cute when the girl's a little drunk. Of course you gotta have cleavage or off_shoulder. And a short_kimono would be ideal. Absurdres is always nice. I don't really want a dude in the picture, but I'd rather not exclude an image with one if it's really good in all the other departments.

I can't just "or" those together, they're so different. The search is wanting to put "bonus points" for each of those extra tags, and asking for the images with the highest "score" to be returned first.

So it might be something like this (syntax can obviously be whatever):
japanese_clothes (cleavage | off_shoulder)\+50 onsen\+30 drunk\+15 short_kimono\+20 absurdres\+20 highres\+10 (1boy | penis)\-30

Now that's harder to implement than simple "or" searching, but I'm just putting ideas out there of how much more depth could be added to tag searching.



Jerl - Group: The Real Administrator - Total Posts: 6706
user_avatar
Posted on: 04/17/16 07:51PM

All feature requests must be posted in the trac. Our main developer does not look in the forums at all. It just so happens that we have at least a half dozen tickets for that exact feature, including one that's currently the fourth from the top on the first page.

Just like I've explained on many of those, we actually didn't make the search engine used by Gelbooru at all. We use a third-party searcher, Apache Solr, since it's considerably faster than just directly searching the database but didn't require a massive amount of backend engineering that would have been required to build something similar ourselves. The way Solr is designed, we are currently unable to process both AND and OR operators in the same search. We do plan on getting around this, but right now our main programmer can barely work on the site's code; he has to work full-time elsewhere since profits from running the site aren't enough to pay a living for both the site operator and the main coder. You can help out with that on Patreon: www.patreon.com/gelbooru?ty=h

We plan on resolving every ticket by the next major release, whether it's implementing the feature/fix or shooting it down. It just may take a while.



add_replyAdd Reply


1