Closed PubliqPhirm closed 3 months ago
As mentioned in the other issue, adds too much overhead for something considered a niche feature, would totally make sense if we were a fiction site or a site focused on text communication, but being an imageboard it is a bit redundant.
Is your feature request related to a problem? Please describe. Implementing these searches would help with implementing some badges on Derpibooru.
Describe the solution you'd like
raw_length
. This is the number of characters in the textbox, including Markdown commands and URLs.word_count
.Describe alternatives you've considered N/A?
Additional context Searching by
word_count
is not meant to be used with exact numbers, as inword_count:420
. Instead, both these search methods are intended to be used more or less exclusively with the inequality matches, as inraw_length.gte:6969
.I've provided a first swing at defining a word counting function below.
It does a good enough job of finding the words as well as ignoring leading
#
in headers. Most other syntax (_italic_
,**bold**
,[a](link)
, etc…) doesn't actually need to be filtered because it is glued to its parent word as far as this function is concerned.If you wanted to be extra-nerdy, perhaps a search by unique word count could also be added via something similar to this snippet I found while trying to remember how regex worked in Elixir.