It's all about the answers!

Ask a question

Iterating Query results limited to 512


Moti Wertheimer (18913628) | asked Oct 06 '10, 4:57 a.m.
JAZZ DEVELOPER
Hi,

I have a simple java client that gets some query results and perform iteration on the workitems.
However, after the 512th workitem I get "QueryExpiredException: Query _GF2HwNEXEd-CJZ9ARNJOag expired".

Any suggestions?

Accepted answer


permanent link
Arne Bister (2.6k12832) | answered Apr 03 '14, 9:12 a.m.
JAZZ DEVELOPER
Moti,

the question is 3.5 years old by now and maybe you found out yourself. Just in case it is still relevant for your work, I found an answer. It appears that IWorkSpaceManager.MAX_QUERY_RESULT is set to 512. To get all queried items nonetheless there is sample code in this jazz.net forum entry: https://jazz.net/forum/questions/128536/is-it-possible-to-fetch-changesets-greater-than-iworkspacemanagermax_query_size-using-ichangesetsearchcriteria

If this answers your question as well, please mark this as accepted.

- Arne
Moti Wertheimer selected this answer as the correct answer

Comments
sam detweiler commented Apr 03 '14, 11:17 a.m. | edited Apr 03 '14, 11:19 a.m.

AND you can never really work away from the query expiry timeout on the server 


the recommendation I posted a couple months ago 
was GET the data ASAP into a local hash, then process the workitems from the hash..

in our project, it took 6-20 hours to process all the workitems in the query results.
we finally changed to the hash model, and it took 12 seconds to get all the workitems in the query, and 14 hours to process after that.  but the query never times out now. 
(set to 5 minutes (300 seconds) on the server by default)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.