| Summary: | /api/projects?query=foobar results in OutOfMemory error | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Michael Ochmann <michael.ochmann> | ||||||
| Component: | Skalli | Assignee: | Michael Ochmann <michael.ochmann> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | ||||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Michael Ochmann
Lucene seems not prepared to accept count=Integer.MAX_VALUE for search queries in org.eclipse.skalli.api.rest.internal.resources.ProjectsResource https://issues.apache.org/jira/browse/LUCENE-504 org.apache.lucene.util.PriorityQueue allocates an Object array with maxSize entries in advance even if the result set is much smaller than maxSize. Incredible waste of memory, but the way TopScoreDocCollector is implemented, it seems to be inevitable. I'm going to add the "start" and "count" query parms for /api/projects?query=foobar so that one can retrieve search hits "page by page" like in the UI. Furthermore, I will limit "count" to the overall number of projects since it is impossible to have more search hits. Created attachment 207720 [details]
proposed patch
Created attachment 207777 [details]
proposed patch (fixed invalid schema)
|