Peer-to-Peer (P2P) networks are used worldwide for many applications such as file sharing or news servers. There are many different implementations available, each with its pros and cons. In this paper, we propose a way to enable approximate queries in a P2P network by using a special encoding function and error correcting codes. The encoding function maintains neighborhood relationships so that two similar inputs will result in two similar outputs. The error correcting code is then used to group the similar encoded values around special codewords. In this manner, similar content is located as close as possible in the network. The algorithm is tested in a simulated environment on a HyperCube type network overlay in order to see if it can be a viable solution in a real network.