I'm trying to implement a date range constraint in search:search.
So far I have a computed bucket range that is working as per the examples
so I can specify, for example:
date:today
But I'd like to add start_date and end_date as options and cant quite get it.
The field I have is a dateTime field.
My "date" contraint looks like this:
<constraint name="date">
<range type="xs:dateTime">
<element ns="http://www.epocrates.com/schemas/logs"
name="log"/>
<attribute ns="" name="time"/>
<computed-bucket name="today" ge="P0D" lt="P1D"
anchor="start-of-day">Today</computed-bucket>
<computed-bucket name="yesterday" ge="-P1D" lt="P0D"
anchor="start-of-day">yesterday</computed-bucket>
<computed-bucket name="15min" ge="-PT15M" le="PT0M"
anchor="now">Last 15 minutes</computed-bucket>
<computed-bucket name="30min" ge="-PT30M" le="PT0M"
anchor="now">Last 30 minutes</computed-bucket>
</range>
</constraint>
Any suggestions on how to make a "start_date" and "end_date" constraint ?
Thanks for any suggestions or pointers to docs.
----------------------------------------
David A. Lee
Senior Principal Software Engineer
Epocrates, Inc.
[email protected]<mailto:[email protected]>
812-482-5224
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general