[Zope] RE: ZCatalog: searching by date

Sachin Shah sachin@rescomp.berkeley.edu
Tue, 23 Nov 1999 17:34:52 -0800


At 10:23 AM 11/23/99 -0500, Michel Pelletier wrote:
>Your search form does not have have a bobobase_modification_time_usage
>hidden field.  This tells ZCatalog you want to do a range search.

OK. Yes, it was in the original post, but it got accidently deleted in the 
last post. Unfortunately that still didn't solve our problem. We are still 
getting No data found. I have done a little more debugging and I think I am 
missing a step here:

if I fill in the raw field and set date to EVER, than it returns no 
results. But if I edit the URL and remove the strings 
after   bobobase_modification_time_usage=  ,   and 
bobobase_modification_time=   then the search returns whatever matches the 
raw correctly.

After reading through the Advanced ZCatalog Searching, I am now wondering 
if the problem is casting, although after reading the document I am still 
not clear on the syntax of casting in Zope.

More information: Our ZCatalog is setup exactly like the first ("raw") 
example in the Z Catalog Tutorial.  And the latest iteration of 
"search_form" is below. any help in this area would be appreciated...

thanks,
sachin shah


<!--#var standard_html_header-->

<form action="report" method="get">
<h2><!--#var document_title--></h2>
Enter query parameters:<br><table>

<tr><th>Search for text:</th>
     <td><input name="raw" width=30 value=""></td></tr>
<tr><th>Modified since: </th>
     <td><input type=hidden name="bobobase_modification_time_usage" 
value="range:min">
                 <select name="bobobase_modification_time">
                     <option value="<!--#var "ZopeTime(0)" -->">Ever</option>
                     <option value="<!--#var "ZopeTime() - 1" 
-->">Yesterday</option>
                     <option value="<!--#var "ZopeTime() - 7" -->">Last 
Week</option>
                     <option value="<!--#var "ZopeTime() - 30" -->">Last 
Month</option>
                     <option value="<!--#var "ZopeTime() - 365" -->">Last 
Year</option>
                 </select></td></tr>
<tr><td colspan=2 align=center>
<input type="SUBMIT" name="SUBMIT" value="Submit Query">
</td></tr>
</table>
</form>
<!--#var standard_html_footer-->