Re: [Zope] ZCatalog and Search Results
At 04:35 pm 6/12/00 +, Jason Spisak wrote: We are closing in on it. Are any of these field indexes? Vendor maybe, Zip? If the ZClass instances always have a value for them, then when you submit this search and leave one of the 'field index' input boxes blank, you'll get no results, I believe. vendor and zip are field indexes. coupon_text and categorylist are keyword indexes. If you add an instance and then try to search, no results will be found. Here's the odd thing. After I add an instance, I go to the zcatalog object in the management interface and manually hit the "update Catalog" button. If I run the search again the new instance will be found if it matches the search criteria. The search will work with one or more search criteria entered into the form fields. form action="CatReport" method="get" h2dtml-var document_title/h2 Enter query parameters:brtable trthCoupon text/th tdinput name="coupon_text" width=30 value=""/td/tr trthCategorylist/th tdinput name="categorylist" width=30 value=""/td/tr trthVendor/th tdinput name="vendor" width=30 value=""/td/tr trthZip/th tdinput name="zip" width=30 value=""/td/tr trtd colspan=2 align=center input type="SUBMIT" name="SUBMIT" value="Submit Query" /td/tr /table /form dtml-var menu dtml-var standard_html_footer Try simplifying it. Try one at a time to find out which one is forcing the no results. Jason Spisak ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog and Search Results
Aaron Payne writes: At 04:35 pm 6/12/00 +, Jason Spisak wrote: We are closing in on it. Are any of these field indexes? Vendor maybe, Zip? If the ZClass instances always have a value for them, then when you submit this search and leave one of the 'field index' input boxes blank, you'll get no results, I believe. vendor and zip are field indexes. coupon_text and categorylist are keyword indexes. If you add an instance and then try to search, no results will be found. Here's the odd thing. After I add an instance, I go to the zcatalog object in the management interface and manually hit the "update Catalog" button. If I run the search again the new instance will be found if it matches the search criteria. The search will work with one or more search criteria entered into the form fields. You were you able to find it programatically, right? If so, then it's the form. Try just searching using a form that searches the exact same proerty as the prgramatical search...example: dtml-in "Catalog(vendor='MyVendor')" dtml-var id /dtml-in form action="CatReport" method="get" h2dtml-var document_title/h2 trthVendor/th tdinput name="vendor" width=30 value=""/td/tr trtd colspan=2 align=center input type="SUBMIT" name="SUBMIT" value="Submit Query" /td/tr /table /form What happens? form action="CatReport" method="get" h2dtml-var document_title/h2 Enter query parameters:brtable trthCoupon text/th tdinput name="coupon_text" width=30 value=""/td/tr trthCategorylist/th tdinput name="categorylist" width=30 value=""/td/tr trthVendor/th tdinput name="vendor" width=30 value=""/td/tr trthZip/th tdinput name="zip" width=30 value=""/td/tr trtd colspan=2 align=center input type="SUBMIT" name="SUBMIT" value="Submit Query" /td/tr /table /form dtml-var menu dtml-var standard_html_footer Try simplifying it. Try one at a time to find out which one is forcing the no results. Jason Spisak Jason Spisak CIO HireTechs.com 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog and Search Results
At 04:59 pm 6/13/00 +, Jason Spisak wrote: Try just searching using a form that searches the exact same proerty as the prgramatical search...example: dtml-in "Catalog(vendor='MyVendor')" dtml-var id /dtml-in This search finds vendor. cool. form action="CatReport" method="get" h2dtml-var document_title/h2 trthVendor/th tdinput name="vendor" width=30 value=""/td/tr trtd colspan=2 align=center input type="SUBMIT" name="SUBMIT" value="Submit Query" /td/tr /table /form The form above works. When I add a second field, the search fails. You can't search the catalog for more than one item at a time? Here is another note: When I update the catalog in the management interface the search will work with criteria from only one of the two fields. 1. add an instance to the catalog 2. enter one or more search criteria into form with more than two fields 3. search fails to find old or new objects in catalog 4. update the catalog in the management interface 5. enter one or more search criteria into form with more than two fields 3. search finds matches in catalog -Aaron What happens? Jason Spisak ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog and Search Results
Aaron Payne writes: We are closing in on it. At 07:37 pm 6/9/00 +, Jason Spisak wrote: Then it has to be the search forms. Can you sned me the search and report methods. Also, you should try looking up and instance programatically right after you create it, like so: dtml-in "Catalog(myProperty='knownValue')" dtml-var id /dtml-in Jason, I used the dtml-in for the catalog(myproperyty='xyz') and I found the newly added zclass. It may be the z search forms. Thanks for your help, Aaron Yep. Let's take a look. search snipped Here is the report method: dtml-var standard_html_header Are any of these field indexes? Vendor maybe, Zip? If the ZClass instances always have a value for them, then when you submit this search and leave one of the 'field index' input boxes blank, you'll get no results, I believe. form action="CatReport" method="get" h2dtml-var document_title/h2 Enter query parameters:brtable trthCoupon text/th tdinput name="coupon_text" width=30 value=""/td/tr trthCategorylist/th tdinput name="categorylist" width=30 value=""/td/tr trthVendor/th tdinput name="vendor" width=30 value=""/td/tr trthZip/th tdinput name="zip" width=30 value=""/td/tr trtd colspan=2 align=center input type="SUBMIT" name="SUBMIT" value="Submit Query" /td/tr /table /form dtml-var menu dtml-var standard_html_footer Try simplifying it. Try one at a time to find out which one is forcing the no results. All my best, Jason Spisak CIO HireTechs.com 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog and Search Results
Jason, I believe the ZCatalog is indexing the new instances because I can see them in the catalog in the management interface. -Aaron At 03:42 pm 6/9/00 +, Jason Spisak wrote: Just out of curiousity, what is making you think it's indexing it? All my best, Jason Spisak ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZCatalog and Search Results
Hi all, I have a zcatalog. I use the methods generated by Z Search Interface to search the catalog. These methods will not recognize new additions to the catalog. After adding a coupon instance, the catalog search fails to find the new coupon or even the the old coupons. The add method of the zclass does have the statement: dtml-call reindex_object. The ZClass is subclassed catalogaware. There is a bug in Zope documented in the mailing lists. I found and tried the following code for my zclass add method: HTML HEADTITLEAdd Coupon ZClass/TITLE/HEAD BODY BGCOLOR="#FF" LINK="#99" VLINK="#55" dtml-if DestinationURL dtml-call "RESPONSE.redirect( DestinationURL+'/manage_workspace')" dtml-else dtml-call "RESPONSE.redirect( URL2+'/manage_workspace')" dtml-with "CouponProductZClass.createInObjectManager(REQUEST['id'], REQUEST)" dtml-call "propertysheets.Basic.manage_changeProperties( REQUEST)" dtml-call reindex_object /dtml-with /dtml-if /body/html When I try to and an instance I get this error: Error Type: AttributeError Error Value: _u I am not sure how to restructure the method. I've been working on this for a while and I am stuck. Peacefully, Aaron ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog and Search Results
Jason, At 11:41 pm 6/8/00 +, Jason Spisak wrote: You have the dtml-if statement in the wrong place if you want the object to be created and then redirect. First, try it without the dtml-if statement like so. HTML HEADTITLEAdd Coupon ZClass/TITLE/HEAD BODY BGCOLOR="#FF" LINK="#99" VLINK="#55" dtml-with "CouponProductZClass.createInObjectManager(REQUEST['id'], REQUEST)" dtml-call "propertysheets.Basic.manage_changeProperties( REQUEST)" dtml-call reindex_object /dtml-with /body/html I tried this in the add method. Actually, both the old and the new method reindexed the instance. The problem occurs when I try to search the catalog after adding the zclass. After adding an instance, the catalog search fails to find the new coupon or even the the old coupons. Only when I manually update the catalog in the mangament interface will it return any matches. Does it index it? Jason Spisak Thanks, Aaron ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )