Hacking geo query to implement hamming distance search

202 views
Skip to first unread message

Debayan Banerjee

unread,
Nov 29, 2013, 4:08:35 PM11/29/13
to mongod...@googlegroups.com
Hi,

I have a list of 30 million binary strings, each of length 576 bits. Given an input binary string with the same number of bits, I want to efficiently query for the string with least hamming distance from among the 30 million strings. 
I realise the while implementing geo query as a feature mongodb developers have done something to efficiently store values that belong to metric spaces. Can I hence "hack" the distance measure in geo query to instead compute hamming distances instead of pytagorean distances between latitude and longitude to satisfy my need?

Dwight Merriman

unread,
Nov 29, 2013, 6:04:53 PM11/29/13
to mongod...@googlegroups.com
i don't really know anything about hamming distance but at a glance, i think you would need N dimensions (perhaps N=576/8?) to do the concept, but the mongodb geosptial only does 2 dimensional.
Reply all
Reply to author
Forward
0 new messages