-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ryan Smith wrote:
> Tried running your script, but I think I'm missing something (I
> usually dont dive this far into the ZMI).  When I run it,
> searchResults does not return anything.  I dont think the problem is
> with searching though.  The problem is for some reason my indexes get
> re-indexed (not sure when this usually happens).  When there is a
> re-index though, sometimes the index is not properly indexed.  This
> causes unexpected results to be returned when I do a search.
> 
>> 6. Run the script, then tell us what you see, versus what you expected
>> to see, when you run the script. When I run it using a Keyword index
>> and that query, I get the following, which is exactly what I expect::
>>
> Here is my output -
> Querying value for access: baz
> 
> Querying value for access: ('baz',)
> 
> Querying value for access: ('bam', 'baz')
> 
> Querying value for access: ('bar', 'baz')
> 
> It does have the following values in my index though
> ('bam', 'baz')
> /Plone/test/qux
> 
> ('bar', 'baz')
> /Plone/test/splift
> 
> ('baz',)
> /Plone/test/foo
> 
>> Querying value for access: baz
>> /scratch/foo
>> /scratch/qux
>> /scratch/splift
>>
>> Querying value for access: ('baz',)
>> /scratch/foo
>> /scratch/qux
>> /scratch/splift
>>
>> Querying value for access: ('bam', 'baz')
>> /scratch/qux
>>
>> Querying value for access: ('bar', 'baz')
>> /scratch/splift

My output was using a KeywordIndex, with 'and' as the operator.

I noted when reading your earlier description that your code was testing
the value of the 'getAccess' entry in the *metadata*, not in the index:
 in fact, you don't need an index at all to do the filtering in that
code.  Can you check on the "Catalog" tab that the metadata for your
indexed objects has the correct 'getAccess' values?


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH0GGY+gerLs4ltQ4RAluoAKCWLq9YozOzKpL7O1dCPqfgCKyU+QCfUS6d
oi0KKIqF6toGV96NAQm3whg=
=gEB/
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to