Topic: Database query question and possible suggestion

Posted under General

I think I remember hearing about an 'or' function in e621's search, but I never figured out how to use it. At any rate, it seems that the search feature, while easy to use, could use improvement.

I was designing a website database, and I implemented a tagging system... And along with it a query that will do the following:

A.) Support an arbitrary number of tags.
B.) Posts containing all tags will be on top.
C.) Posts containing most tags will be below that.
D.) And so on, until posts containing only one of the tags will be on the bottom.

This is the progress so far on the actual website database:
https://github.com/Tynach/Unite/blob/dimentions/database/rpsite.mysql

And this is the file containing the query I came up with:
https://github.com/Tynach/Unite/blob/dimentions/database/queries.mysql

I think it would be cool if e621 implemented something like this. If this is inefficient, if there are reasons this is bad, and in fact, any other comments, critique, etc. on this are all very welcome. Any interest in my particular site (centered around roleplaying) would also be nice, but right now I'm posting the part that I think is most relevant to you guys.

I created this query trying to imitate the way e621 and other *booru sites work, and failed... But ended up really liking the failed version more. So, I must say I do really like e621's search feature; I just think this might, if possible to implement, make things better.

Updated

Nice! Does answer my question about the 'or' thing.

But I still think my query idea has merit - supports any number of tags to search for, and will give more results (with current behavior at the top).

Updated by anonymous

I would only like your system if it could be turned off, because "more results" is generally not what I'm looking for when I'm making a search with large numbers of tags.

Updated by anonymous

True, but often when I myself make large searches with lots of tags, I'm looking for a particular image, or a very specific scene. With the former, often some basic tags are not included; for example, just look at the number of pictures tagged 'bathroom', verses the number tagged 'toilet'. Sure you can be in a bathroom without a toilet, but I've found that there are many 'toilet' images that are not tagged 'bathroom'.

In the latter case, there may not actually BE images that match your EXACT criteria, making you have to leave one tag out, one at a time, until you can find something 'close enough'. My setup basically automatically and systematically gives you the results you would get if you were to do this, right at the top.

Updated by anonymous

  • 1