Unable to query API using date type (before/after)
- Article Type: General
- Product: DigiTool
- Product Version: 3
Description:
Trying to query the repository via the API using the createDate and updateDate elements (SP #777)
When I use this search
<x_condition>
<type>before</type>
<element>createDate</element>
<value>01/11/2008</value>
</x_condition>
I get the following result
<x_result total_num_results="0" num_results="0">
<error>true</error>
<error_description>Failed to count number of entities </error_description>
</x_result>
And this is logged to server.log
2008-10-17 13:35:56,608 INFO [com.exlibris.digitool.repository.explore.ExploreTaskInvoker] DIGITAL ENTITY QUERY: select hc from HDeControl hc where hc.createDate < to_date('01/11/2008','MM/dd/yyyy') hc.owner='DTL01' and order by hc.pid desc
It appears that the sql is incorrect - should be hc.createDate < to_date('01/11/2008','MM/dd/yyyy') AND hc.owner='DTL01'order by hc.pid desc
When I try to search on updateDate
<x_condition>
<type>after</type>
<element>updateDate</element>
<value>01/11/2008</value>
</x_condition>
The API doesn't return an error -- but the log file implies that the search isn't be done correctly:
2008-10-17 13:38:56,557 INFO [com.exlibris.digitool.repository.explore.ExploreTaskInvoker] DIGITAL ENTITY QUERY: select hc from HDeControl hc where hc.owner='DTL01'and contains(INDEXXML,'01/11/2008 WITHIN updateDate ')>0 order by hc.pid desc
This is expected to be fixed for SP 23
Resolution:
From issue resolution:
rpc 1337[02/03/2009 23:44:25 Yuval Richler]
Final Status: Closed [3/2/2009 11:44:32 PM Yuval Richler]
rpc 1337[02/03/2009 23:44:25 Yuval Richler]
Final Status: Closed [3/2/2009 11:44:32 PM Yuval Richler]
- Article last edited: 10/8/2013