Fix #4406: Add "commentary:" metasearch.

Add:

* commentary:true (posts with commentary)
* commentary:false (posts without commentary)
* commentary:translated (posts with translated commentary)
* commentary:untranslated (posts with untranslated commentary)
* commentary:"text" (posts where any commentary field matches "text")

Known issues:

* There's no way to escape the true, false, translated, or
  untranslated keywords to do a literal text search for commentaries
  containing one of these keywords.

* Negated searches may be slow. Using a left outer join instead of a
  subquery would be faster in most cases, but negating it is harder.
This commit is contained in:
evazion
2020-04-16 23:53:04 -05:00
parent 9901161bbf
commit e848011080
4 changed files with 72 additions and 10 deletions

View File

@@ -288,6 +288,9 @@ Autocomplete.static_metatags = {
filetype: [
"jpg", "png", "gif", "swf", "zip", "webm", "mp4"
],
commentary: [
"true", "false", "translated", "untranslated"
],
disapproved: Autocomplete.DISAPPROVAL_REASONS
}