That is an unmanageable solution and it will certainly destroy the performance of a DHT. The technology your looking for is a binary search tree such as PHT, so you will need to introduce some sort of algorithm to map the characters of the published key to a query-able index. Google "DHT + PHT", or Cubit etc...
~J On Dec 4, 2008, at 9:21 AM, Will Morton wrote: > Hello hackers; > > I have a large number of items, each with string metadata, that I want > to search for. I want the search to be decentralised, so I'm going to > use a DHT (although I'm happy to use another data structure if it's > more optimal). I want to be able to search the items based on partial > matches, so if an item has title 'foobarbaz', I want it to be returned > when I search for 'foo', 'bar' or 'baz'. > > So when I am adding entries into the DHT, do I have to add keys for > all possible substrings of the thing I am indexing (so with minimum > search length 3, I need to add keys for 'foo', 'oob', 'oba', etc), or > are there optimisations I can make? Presumably this is a well-studied > area; can anyone point me at papers concerning this problem? Or else, > describe how gnutella/edonkey do it? > > Thanks, > > Will > _______________________________________________ > p2p-hackers mailing list > [email protected] > http://lists.zooko.com/mailman/listinfo/p2p-hackers _______________________________________________ p2p-hackers mailing list [email protected] http://lists.zooko.com/mailman/listinfo/p2p-hackers
