Some queries need to be typed (dates, counters). Since the datastructure is used as a data bus between widgets, this means that datastructure values have to be typed, too. This is done by prepare() methods of filter widgets. This fits well the case where search results are displayed within a call to !CPSDocument.renderObject in 'view' mode, but doesn't work when the standard request parsing enters the process, e.g, in search results pages.
Search results pages make use of LayoutsTool.renderLayout, which calls:
1. prepare
2. !Datastructure.updateFromMapping()
3. validate
The second of these steps rewrites the request string in the datastructure, therefore reverting the typing that was done during step 1.
Current ugly fix is to call prepare() within filter widgets validate() method. In particular, preparation is called twice.
IIRC, the same happens within editCPSDocument.
One could envision many directions, including making proper use of the underlying schema and MappingStorageAdapter. But this has to work in the two scenarios.