> "Alexander G. M. Smith" <agmsmith@xxxxxxxxxx> wrote: > > Jonas Sundström wrote on Mon, 20 Dec 2004 14:23:50 +0100 CET: > > > Is there a way to make queries on missing attributes? > > > > Since it needs an index to iterate over, you can use the file type > > to > > just > > check the files you need, or even "name=*" to iterate over all > > files. > > The > > query would be something like name=*&&attribute="", but that only > > works for > > strings I think. Or maybe you could try name=*&&attribute!=* > > I was using (name=*)&&(something else) in my testing. IIRC it would > only return files that had the attribute. I could be wrong though. > Perhaps there's some boolean logic I haven't tested. I recall some ppl saying =="*" and =="**" produced different outputs, you might want to try both. (why I don't know, well "*X" means ends with X, "X*" means starts with X, maybe "*" only means ends with nothing to some fs, while "**" means contains '', which is semantically different ?) > > I added a couple of operators in my RAM file system for testing > > attribute > > existance, <>attribute for files including that attribute, and >< > > attribute > > for ones that don't have it (think of the > and < together making > > an > > X shape > > to cross out the possibility of existance). But since the query > > language > > is implemented by each file system (some wasted effort there - the > > OS > > should > > just provide indices, let library code do queries), those operators > > are only > > in AGMSRAMFileSystem. Btw, your code is a bit... hairy I'd say :P Will have to write my own parser for googlefs :-( Would really be useful to have that available as a module. /me adds a TODO item nr 46763276. François.