KeywordIndex: Find empty list?
Hi! Is it possible to find the objects which have an empty list with a KeywordIndex? If I search for {myattribute:[]} I get all objects returned. thomas
Thomas Güttler wrote at 2003-7-14 10:50 +0200:
Is it possible to find the objects which have an empty list with a KeywordIndex?
No. This is not the type of queries a "KeywordIndex" supports. A "KeywordIndex" indexes a document under each element found in the sequence. Such an indexing scheme does not allow for precise keyword list lookups. You can only get efficient subset lookups. You may be interested in a "FieldIndex" with "tuple" (not "list"!) values.
If I search for {myattribute:[]} I get all objects returned.
This is a bug (already reported, see mailing list archive). Dieter
Chris Withers wrote at 2003-7-16 08:31 +0100:
Dieter Maurer wrote:
If I search for {myattribute:[]} I get all objects returned.
This is a bug (already reported, see mailing list archive).
I think this may actually be by design...
Then the design would be buggy: The explicit phrase for "searchResults(myattribute=keywordList)" (in case "myattribute" is a keyword index) is: Find all objects that are indexed by "myattribute" for at least one keyword in "keywordList". Now, if "keywordList" is empty, no object can be indexed for at least one keyword in this list. Dieter
Dieter Maurer wrote:
Find all objects that are indexed by "myattribute" for at least one keyword in "keywordList".
Now, if "keywordList" is empty, no object can be indexed for at least one keyword in this list.
But, I think this second bit is overridden by the over-archign ZCatalog paradigm of "if your search terms are empty, return everything"... Dunno who would be able to answer that for definite though... Chris
On Thursday 17 July 2003 13:03, Chris Withers wrote:
Dieter Maurer wrote:
Find all objects that are indexed by "myattribute" for at least one keyword in "keywordList".
Now, if "keywordList" is empty, no object can be indexed for at least one keyword in this list.
But, I think this second bit is overridden by the over-archign ZCatalog paradigm of "if your search terms are empty, return everything"...
In this case it is false to say that there are no search terms. There is exactly one search term, and it should always return an empty result set. -- Toby Dickenson http://www.geminidataloggers.com/people/tdickenson
participants (4)
-
Chris Withers -
Dieter Maurer -
Thomas Güttler -
Toby Dickenson