Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362827

Summary: [search] Support pagination of search results
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ServerAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: libingw
Version: 0.3   
Target Milestone: 0.4 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 362215, 363629    

Description John Arthorne CLA 2011-11-03 14:19:15 EDT
Solr supports the client specifying the number of results to return and starting point. This allows a client to paginate search results. We need to enable these fields on the server.
Comment 1 John Arthorne CLA 2011-11-03 16:46:03 EDT
I have enabled pagination on the server side. Client can pass additional fields "rows" to specify the number of documents to return, and "start" to specify the starting offset for results beyond the first page. Example (return 20 results, starting at the 40th result in the list):

http://localhost:8080/search/search.html#?rows=20&start=40&q=Search*

Commit:

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=a150196a6b694ab0abbb1eed7dcab1e9b640e8c0
Comment 2 libing wang CLA 2011-11-03 17:06:43 EDT
(In reply to comment #1)
> I have enabled pagination on the server side. Client can pass additional fields
> "rows" to specify the number of documents to return, and "start" to specify the
> starting offset for results beyond the first page. Example (return 20 results,
> starting at the 40th result in the list):
> 
> http://localhost:8080/search/search.html#?rows=20&start=40&q=Search*
> 
> Commit:
> 
> http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=a150196a6b694ab0abbb1eed7dcab1e9b640e8c0

Cool. In fire fox, I even tried ?rows=50&start=0&q=Search* and the performance wasn't bad.
That was done within 5 seconds, which covers page loading, search, and 49 rounds of file meta data request.

I also tried expanding all the 49 files, which means 49 rounds of file content request and in-file search. Done within 1.5 secs. Very fast.

I will  do some more tests and tune up a page size.