1. A computer-implemented method comprising: obtaining, by a computing system, at least one content item for which a hash value is to be generated; generating, by the computing system, a set of n-grams based at least in part on the at least one content item; generating, by the computing system, a first vector that includes a set of elements based at least in part on the set of n-grams, wherein the set of elements maintain respective counts of n-grams in the set of n-grams, and wherein the first vector is a count-min sketch (CM sketch) vector that is associated with at least one hash function; determining, by the computing system, a quantized vector based at least in part on the first vector and one or more parameters; and generating, by the computing system, the hash value for the at least one content item based at least in part on the quantized vector, wherein the hash value is a similarity-preserving hash value, and wherein the hash value for the content item is able to be compared with a similarity-preserving hash value generated for a different content item to determine an amount of similarity between the content item and the different content item.