[ZCM] [ZC] 889/ 3 Accept "Keyword index query error"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri May 27 08:39:11 EDT 2005


Issue #889 Update (Accept) "Keyword index query error"
 Status Accepted, Catalog/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/889

==============================================================
= Accept - Entry #3 by tseaver on May 27, 2005 8:39 am

 Status: Pending => Accepted

 Supporters added: tseaver

Thanks for the patch.  I will be checking it in for the 2.7 branch,
the 2.8 branch, and the SVN HEAD.

BTW, a small style niggle:  please prefer 'self.failUnless' or
'self.assert_' to a bare 'assert' in unit tests.
________________________________________
= Comment - Entry #2 by aroda on May 27, 2005 4:41 am


Uploaded:  "patch_889.txt"
 - http://www.zope.org/Collectors/Zope/889/patch_889.txt/view
Attached is a patch that solves the bug and adds a new test to the test suite.

________________________________________
= Request - Entry #1 by tejay on Apr 23, 2003 8:04 pm

Submiting a query such as: {'query' : [key1,key2], operator='and'} from a python product doesn't produce the expected result when no objects are indexed with either key1 or key2.  You would expect no objects to be found, but instead if either key1 or key2 returns no matches, then that is ignored and the matches for the other key ar returned.  

PluginIndexes/common/UnIndex.py::_apply_index() is the culprit I beleive.  It does a query for the index on each key seperately, and if the result is NOT empty, it intersects the result (went he operator is 'and').  

Instead it should return an empty set if any index lookup is empty.
==============================================================



More information about the Zope-Collector-Monitor mailing list