[Zope] ZCatalog and Search Results

Jason Spisak 444@hiretechs.com
Tue, 13 Jun 2000 16:59:37 GMT


Aaron Payne writes:

> At 04:35 pm 6/12/00 +0000, 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">
<h2><dtml-var document_title></h2>
<tr><th>Vendor</th>
<td><input name="vendor"
width=30 value=""></td></tr>

<tr><td colspan=2 align=center>
<input type="SUBMIT" name="SUBMIT" value="Submit Query">
</td></tr>
</table>
</form>


What happens?

> > >
> > > <form action="CatReport" method="get">
> > > <h2><dtml-var document_title></h2>
> > > Enter query parameters:<br><table>
> > >
> > > <tr><th>Coupon text</th>
> > >      <td><input name="coupon_text"
> > >                 width=30 value=""></td></tr>
> > > <tr><th>Categorylist</th>
> > >      <td><input name="categorylist"
> > >                 width=30 value=""></td></tr>
> > > <tr><th>Vendor</th>
> > >      <td><input name="vendor"
> > >                 width=30 value=""></td></tr>
> > > <tr><th>Zip</th>
> > >      <td><input name="zip"
> > >                 width=30 value=""></td></tr>
> > >
> > >
> > > <tr><td 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.