Re: [Zope3-Users] How to use catalog.searchResults
On Saturday 20 May 2006 11:04, Florian Lindner wrote: How to use it? I would strongly suggest looking into hurry.query from z3-base. It is very easy to use. Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] How to use catalog.searchResults
(Pdb) catalog.searchResults(AbbreviationIndex = ABC) *** TypeError: ('two-length tuple expected', 'ABC') (Pdb) catalog.searchResults([AbbreviationIndex ,ABC]) *** TypeError: searchResults() takes exactly 1 argument (2 given) (Pdb) res = catalog.searchResults() (Pdb) res == None True How to use it? Have you tried catalog.searchResults(idx=('AbbreviationIndex', 'ABC')) Sincerely, Mats ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] How to use catalog.searchResults
Am Sonntag, 21. Mai 2006 17:58 schrieb mats.nordgren: (Pdb) catalog.searchResults(AbbreviationIndex = ABC) *** TypeError: ('two-length tuple expected', 'ABC') (Pdb) catalog.searchResults([AbbreviationIndex ,ABC]) *** TypeError: searchResults() takes exactly 1 argument (2 given) (Pdb) res = catalog.searchResults() (Pdb) res == None True How to use it? Have you tried catalog.searchResults(idx=('AbbreviationIndex', 'ABC')) Do you mean idx as a placeholder for something or really idx? it gives: (Pdb) results = catalog.searchResults(idx=('AbbreviationIndex', 'ABC')) *** KeyError: 'idx' Regards, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] How to use catalog.searchResults
On Sun, 2006-05-21 at 18:49 +0200, Florian Lindner wrote: Am Sonntag, 21. Mai 2006 17:58 schrieb mats.nordgren: Have you tried catalog.searchResults(idx=('AbbreviationIndex', 'ABC')) Do you mean idx as a placeholder for something or really idx? idx would be your index name. I think Field indexes expect a low and high search value, hence the two-length tuple. Text indexes can be passed a single search value, eg. idx='search string' Alen ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] How to use catalog.searchResults
My bad, should be catalog.searchResults(AbbreviationIndex=('ABC', 'ABC') Field indices expect a high and low as Alen stated Sincerely, Mats On Sun, 21 May 2006 18:49:46 +0200, Florian Lindner wrote Am Sonntag, 21. Mai 2006 17:58 schrieb mats.nordgren: (Pdb) catalog.searchResults(AbbreviationIndex = ABC) *** TypeError: ('two-length tuple expected', 'ABC') (Pdb) catalog.searchResults([AbbreviationIndex ,ABC]) *** TypeError: searchResults() takes exactly 1 argument (2 given) (Pdb) res = catalog.searchResults() (Pdb) res == None True How to use it? Have you tried catalog.searchResults(idx=('AbbreviationIndex', 'ABC')) Do you mean idx as a placeholder for something or really idx? it gives: (Pdb) results = catalog.searchResults(idx=('AbbreviationIndex', 'ABC')) *** KeyError: 'idx' Regards, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] How to use catalog.searchResults
Hello, I have a catalog: (Pdb) catalog zope.app.catalog.catalog.Catalog object at 0xb4a3f66c with one index: (Pdb) for i in catalog.keys(): print i AbbreviationIndex but I can't find a way to use the search results function: (Pdb) catalog.searchResults(AbbreviationIndex = ABC) *** TypeError: ('two-length tuple expected', 'ABC') (Pdb) catalog.searchResults([AbbreviationIndex ,ABC]) *** TypeError: searchResults() takes exactly 1 argument (2 given) (Pdb) res = catalog.searchResults() (Pdb) res == None True How to use it? Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users