We propose a new cryptographic notion called generalized closest substring encryption. In this notion, a ciphertext encrypted with a string S can be decrypted with a private key of another string S′, if there exist a substring of S, i.e. S^, and a substring of S′, i.e. S^′, that are "close" to each other measured by their "overlap distance". The overlap distance between S^ and S^′ is the number of identical positions at which the corresponding symbols are the same. In comparison with other encryption systems, the closest notion is the Fuzzy-IBE proposed by Sahai and Waters. The main difference is that the Fuzzy-IBE measures the overlap distance between S and S′, while ours measures the overlap distance of all of their substrings (including the complete string), and we take the maximum value among those. The overlap distance between their substrings will measure the similarity of S and S′ more precisely compared to the overlap distance between the two complete strings. We note that embedding this overlap distance in an encryption is a challenging task, in particular in order to achieve a practical scheme. Therefore, we invent a new approach to develop a practical generalized closest substring encryption system. The novelty of our approach relies on the way we generate ciphertext and private key representing the complete string so that they can still measure the overlap distance of substrings. The size of ciphertext and private key grow linearly only in the length of the input string. We prove the security in the selective model under a generalization of decision q-Bilinear Diffie-Hellman Exponent assumption.