Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds the disjunctive operands to search, e.g.
~computer ~thing ~score:>5
(means: computer OR thing OR score:>5), as well as negative disjunctive operands e.g.~cat ~-phone
(means: cat OR NOT phone). This also works with image conditions.While I believe this operation is acceptably efficient for legitimate use, it's probably wise to add limits, especially for SPEED_HAX, but for security in general. Abusing wildcards (or really just a huge number of tags) compounds with negated disjunction e.g. searching
~-*f* ~-*a* ~-*s* ~-*t*
is an effective DoS attack on a decent-sized booru, even just two of those letters forces my (20,000 image, 7,000 tags) test booru into 14 seconds of computation. Maybe make negated disjunction disabled or limited by default?Closes #292
Closes #824
Built on top of #1082