Chris McDonough wrote:
Chris:
I am working on getting a decent query language for ZCatalog/Catalog and
Very cool...
I have been able to make good progress, however I am running into a bit of an issue that I thought you might know something about:
In order to implement a "!=" query operator, I am trying to do the following:
Tricky.
Ok, I was able to get it to work by instantiating a IISet around _unindex.keys() and passing that to difference (Thanks!), however, I notice an interesting side effect. Let's say you have a TextIndex on title and you do the following query: title != 'foo*' Which to me means: "all cataloged objects whose title do not match the substring 'foo*'" However, this is not what you get exactly, instead you get: "all cataloged objects that have a non-empty title that does not match the substring 'foo*'" Because from what I am seeing, objects with empty (or no) titles are not included in the index *at all*. So the set of "all objects" does not include ones without titles. I could fix this by making all objects be instead "All objects in the catalog" (via catalog.data.keys()) instead of "all objects in the index", but I wanted to see if anyone had additional thoughts about this. -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>