Ah, I was just about to ask whether this system is also responsible for a change from offering tags that had more than 3 instances, but upon rereading your post I see that yes it was. Just ran into that now where I had to jump over to the tags page to see whether a tag for something existed, instead of having it pop up as I began to type. Big step down in usefulness, IMO.
IMO it is critical. It helps with tag discovery: a user may still find a tag that’s worded differently than they think if what they’re typing matched an aliased version. It helps with tag meanings: if a less-specific term has been aliased into something more self-evident, they’ll see the clearer-named tag if typing the less-clear aliased version.
So I tried building a trie in the most space-optimal way I could write in a few minutes.
List of 65k tags in a packed trie, with unshared suffixes skipped: 723142 bytes
The current encoding is optimized to avoid creating garbage on the JS heap, to prevent any lag. Switching to a compact trie representation might save space, and could be internally flipped into a binary-searchable ArrayBuffer on the client side. This would probably avoid the creation of much garbage, but then it would waste time in JS constructing the list, whereas the current compiled object is immediately ready to go as soon as it is downloaded. So, I’m not sure what’s optimal here.
Yes, this is intentional.
The autocompleter cache appears to be just a binary-searchable linear list of tags and implications. If you switched to a (compressed) trie, you could remove all the redundant prefixes (like “artist:”) and fit far more tags in the cache, and maybe leave some space for aliases while still staying below the size budget.
There is a trade-off made between space and accuracy for the clientside tag completion.
For example, typing “fullbody” does not display “full body”.
If you do not specify a field to search over, the search engine will search for posts with a body that is similar to the query's word stems. For example, posts containing the words
spread wings would all be found by a search for
sewing would not be.
|Literal||Matches the author of this post. Anonymous authors will never match this term.|
|Full Text||Matches the body of this post. This is the default field.|
|Date/Time Range||Matches the creation time of this post.|
|Numeric Range||Matches the numeric surrogate key for this post.|
|Full Text||Matches the title of the topic.|
|Literal||Matches the numeric surrogate key for the topic this post belongs to.|
|Numeric Range||Matches the offset from the beginning of the topic of this post. Positions begin at 0.|
|Date/Time Range||Matches the creation or last edit time of this post.|
|Literal||Matches posts with the specified user_id. Anonymous users will never match this term.|
|Literal||Matches the short name for the forum this post belongs to.|