I am using Jira's SearchService for reporting againts large number of issues (>200K issues). Returning this many issues from a search and loading them into memory is clearly bad for the system. (Most of the time ends up with an OutOfMemory Exception)
On the other hand, SearchProvider.search() supports paging but each page has to be retrieved with a separate search() so searching repeatedly for different pages may return inconsistent data if the underlying data changes between your searches.
Keeping in mind that memory is the bottleneck:
- How can I do paging against a static (or let's say stable) result set?
- If that is not possbile, how can I do a search that returns only issueID's (so resultset uses far less memory) and I will retrieve each issue individually later (so garbage collector will collect the objects that I am done with)
I am working with Jira 7.x server but I prefer a solution that works on Jira 6.x as well, if possible.
P.S. I found some community answers in the site but most of them does not match my need or they are old and the api seems to be deprecated.