I have given some thought to the issue of searching, and I have come up
with some ideas which I would like to get your opinions on.
I started thinking about what if you could search for something like:
contains("tori amos") and (contains("little earthquakes") or
contains("girl"))
When a node received such a request it would rate all of its keys
against this search using a scoring system.
The most primitive request, say "tori amos" on its own, would be scored
lexicographically, so that if a key was equal to it, it would have a
score of "1", and this score would decrease in proportion to how
lexicographically different it was. This would be designed to rate
information in the same manner that information is currently compared in
the system providing backward compatibility.
The contains keyword will return 1 if the string given is contained
within the key, and the less of the keyword that can be found in the key
- the lower the value.
For combinations such as "and" and "or" we can take a leaf out of the
fuzzy-logic book - "and" will return the minimum of the score of the two
branches, and "or" will return the maximum. "not" would return 1 - the
score of its branch. We can add further operators too provided that
they can return a "fuzzy" score between 0 and 1.
This scoring system could then be used to determine which of the keys in
the datastore are closest to the data we are seeking.
So will this work? I am not sure - there are many complex issues. Will
the network topology adapt accordingly given that each different request
defines a different metric of "fitness" for each key? Perhaps the
network will adapt to handle this. It may be that common searches (like
'contains("tori amos") and contains("kate bush")') will return
information easily, but weirder searches (like 'contains("spice girls")
and contains("metallica")') will be much slower to find their
information.
Before implementing this we must test it out on one (or more) of the
simulation systems currently being developed.
Ian.
_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev