On 07 Apr 2001 00:38:59 +0200, David Levy wrote:
> hi
> i've read your discussion about indices key format ...
> 
> but i'd like to have a precision concerning these in-freenet indices :
> Do u really think a catalog of keys is enough ?
> i mean, shouldn't we try to store more 'metadatas' concerning files
> associated with keys ?
> 
> these could be an option while inserting in the indices ...
> Espra choosed Dublin Core format to describe files, it could be great to
> apply this to all keys, in my opinion
> cause what is a search engine without additional information about found
> files ?
> (format, SIZE, date of insert,.....)
> 
> the fact is I consider Freenet potentially many times more powerfull and
> useful than naspter, but it is reserved for a minority of users even now, 2
> years after....
> i am right ??
> 
> 
> 
> PS : excuse for my ugly english : i am just a french frog
> ;o)
> David

When I wrote FreeSearch I made a metadata system that used a simple
Hashtable.  If you wanted to add a proper filename, you just set that
particular key in the Hashtable.  The only real interface is void
set(String keyname, Object value) and Object get(String keyname).
Writing to text is done with the toString function, which is easily
customized.  You can also make a constructor that reads a string in the
toString format to initialize an object based on a string.

This solves a couple problems.  First you don't need to worry about what
keys go in what order.  if I say "title=blah" then it knows to set the
title key to blah.  Also if the spec ever needs to be changed you don't
have to rewrite reams of code -- just get and set different keys.

Owen Williams

_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to