Warning: file_put_contents(): Only 0 of 28363 bytes written, possibly out of free disk space in /www/wwwroot/gelbooru.me/index.php on line 171
How to search or/and now? - Forum | Gelbooru - Free Anime and Hentai Gallery
Notice: Some of you may be worried about Gelbooru due to some law making the round requiring IDs for images and videos being uploaded. We have received our first ID today. Please retweet if you can.(Dismiss)

Now Viewing: How to search or/and now?
Keep it civil, do not flame or bait other users. If you notice anything illegal or inappropriate being discussed, contact an administrator or moderator.

antifaith - Group: Member - Total Posts: 4
user_avatar
How to search or/and now?
Posted on: 07/12/20 02:59AM

Edit: The or function now seems like it functions as it should


Yesterday I figured out how to search for multiple tags and all possible combinations of those tags, but that functionality has been disabled, my bookmarks for searches this worked for no longer work. Is it still possible to search for all possible combinations of given tags?

((micro_bikini ~ gigantic_breasts ~ partially_visible_vulva ~ pussy) ~ (gigantic_breasts ~ partially_visible_vulva ~ pussy) ~ (gigantic_breasts ~ partially_visible_vulva ~ pussy) ~ (partially_visible_vulva ~ pussy) ~ (partially_visible_vulva ~ pussy) ~ (partially_visible_vulva ~ pussy))

This worked yesterday to search for any possible combination of the 4 tags...

Experimenting further, it seems like maybe or searches don't exclude the other options if they are just chained in, but some tags don't get chained in and sometimes or functionality just stops. Are y'all messing with it right now?



lozertuser - Group: Administrator - Total Posts: 1990
user_avatar
Posted on: 07/12/20 09:12AM

It worked previously because of a bug with () in tags, I'm looking into fixing this somehow to allow such a complex query, but I'm not very good at this. :D

I've updated the syntax, hopefully this is the last time I have to troubleshoot issues with it.



Meem0 - Group: Member - Total Posts: 6
user_avatar
Posted on: 07/12/20 11:52AM

What do you mean by "all possible combinations"?

Your query is doing an OR of ORs, which is the same as one big OR. It's the same as if you had just put {micro_bikini ~ gigantic_breasts ~ partially_visible_vulva ~ pussy}

Do you want at least 2 of the 4 tags? Then you need ORs of ANDs:

{{micro_bikini gigantic_breasts} ~
{micro_bikini partially_visible_vulva} ~
{micro_bikini pussy} ~
{gigantic_breasts partially_visible_vulva} ~
{gigantic_breasts pussy} ~
{partially_visible_vulva pussy}}

Unfortunately that syntax isn't supported, you can't seem to group the ANDs together.

But, we can convert it to the format that is supported: ANDs of ORs, or "conjunctive normal form"!

If you let A, B, C, D be your four tags, and put this into Wolfram Alpha:
CNF (A AND B) OR (B AND C) OR (A AND C) OR (A AND D) OR (B AND D) OR (C AND D)
It outputs:
(A OR B OR C) AND (A OR B OR D) AND (A OR C OR D) AND (B OR C OR D)

Converted back to your tags, the search is:
{micro_bikini ~ gigantic_breasts ~ partially_visible_vulva} {micro_bikini ~ gigantic_breasts ~ pussy} {micro_bikini ~ partially_visible_vulva ~ pussy} {gigantic_breasts ~ partially_visible_vulva ~ pussy}

Test it out, and it does give all images with at least two of those tags!

You could try the Wolfram Alpha thing yourself if you wanted at least three of the tags.



antifaith - Group: Member - Total Posts: 4
user_avatar
Posted on: 07/13/20 02:25PM

Meem0 said:
What do you mean by "all possible combinations"?

Your query is doing an OR of ORs, which is the same as one big OR. It's the same as if you had just put {micro_bikini ~ gigantic_breasts ~ partially_visible_vulva ~ pussy}

Do you want at least 2 of the 4 tags? Then you need ORs of ANDs:

{{micro_bikini gigantic_breasts} ~
{micro_bikini partially_visible_vulva} ~
{micro_bikini pussy} ~
{gigantic_breasts partially_visible_vulva} ~
{gigantic_breasts pussy} ~
{partially_visible_vulva pussy}}

Unfortunately that syntax isn't supported, you can't seem to group the ANDs together.

But, we can convert it to the format that is supported: ANDs of ORs, or "conjunctive normal form"!

If you let A, B, C, D be your four tags, and put this into Wolfram Alpha:
CNF (A AND B) OR (B AND C) OR (A AND C) OR (A AND D) OR (B AND D) OR (C AND D)
It outputs:
(A OR B OR C) AND (A OR B OR D) AND (A OR C OR D) AND (B OR C OR D)

Converted back to your tags, the search is:
{micro_bikini ~ gigantic_breasts ~ partially_visible_vulva} {micro_bikini ~ gigantic_breasts ~ pussy} {micro_bikini ~ partially_visible_vulva ~ pussy} {gigantic_breasts ~ partially_visible_vulva ~ pussy}

Test it out, and it does give all images with at least two of those tags!

You could try the Wolfram Alpha thing yourself if you wanted at least three of the tags.


I found that syntax empirically when other syntaxes did not work, I did not follow logic as much as I just I tried many different queries including what you suggested until I successfully got all possible combinations of the 2, 3 and then 4 tags. I'll experiment again today since the syntax has been updated again, since last night OR statements were just breaking for some tags such as pussy.



antifaith - Group: Member - Total Posts: 4
user_avatar
Posted on: 07/13/20 02:40PM

Again, no idea why, I tried the logical option and didn't get some results, but this works now! Maybe because the {micro_bikini pussy} acts as a wildcard so the search doesn't exclude other options? IDK

{micro_bikini ~ gigantic_breasts ~ partially_visible_vulva ~ pussy ~ {micro_bikini pussy}}



antifaith - Group: Member - Total Posts: 4
user_avatar
Posted on: 07/17/20 03:38PM

Proper functionality now seems to be implemented, {micro_bikini ~ gigantic_breasts ~ partially_visible_vulva ~ pussy} seems to return every possible combination, good job!



NotTheNax - Group: Member - Total Posts: 47
user_avatar
Posted on: 05/13/21 01:12AM

gelbooru.com/index.php?pa...=&s=view&id=26263
probably a good place to put this


HowtoCheatsheet

I don't know why this isn't more readily available you've gotta go hunting for it
or...
i think some guy in the comments of one of my questions gave it to my similar to what I'm doing now

definitely a massive help



Jerl - Group: Administrator's Pet - Total Posts: 5655
user_avatar
Posted on: 05/13/21 10:58AM

A list of all the howto pages is linked to on almost all pages on the site.



add_replyAdd Reply


1