Re: [dcdev] Searching
Carl-Adam Brengesjö <[email protected]>
2004-01-15 11:57
[email protected]

As for hashing, yes, load is a problem if you use the current way of doing it. The hashing part in my command is clearly optional, and you often doesnt search for hashes if you havn't already downloaded a "MD5" or "*.sfv" file (or simlar) of the files you are going to download. But say that a user does this. And another client receives this query, when that client understands that we are looking for a specific hash, that client could look into a indexe'd database for a quick search that would result in fileinfo; filename & size. Ofcourse, this requires a client implementation. So if the client doesnt like to compare hashes.. just dont do it! instead dump the query and dont process it. Yes this results  in fewer results to the client who made the search, but it would /encourage/ people doing more advanced clients, no?

And for mime types - yes, that is problems with that aswell - but as for the other search command, how do you decide what type the file is anyways? File extension? If so, why not make a basic sets of mimetypes for different mimetypes that is _recommended_ to use in clients? Or a command that would return (from hub to client) a basic set of mimetypes for some filextensions so that all clients in the same hub uses same (this is just a sloppy idea, dont take it seriously). As for now I say we must decide a way wether to use mimetypes or not. We still have to use some sort of type definitions of files, so what will we use? mimetypes are a global (partially) way to do it, and will be used more in the future, so why not use it? What we DONT have to decide at this stage is HOW to use it. (take a look on my other mail, "Developing")

How would the simpliest form of query (just size and filename) look like with the other? (i havn't quite understood it yet) maybey have a simple and advanced search command, if that would result in shorter messages and easier/quicker to parse. (just speculating)

About filename matching in the other search command, how do you know where the string starts (I understand that $ ends)
( N =~ avi$ ) would match (not) "avi" or (not) " avi".
isn't it just better to have it surrounded by "" (use $ if you like, " is just a more standard way, and any char is as good as the other)


ps. i originally wrote "developing" and this reply as one mail, but they kinda got off-subject from eachother, so I splitted them.

DC Developers mailinglist