Search and Paging

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2007 02:30 AM
I am having a bit of a problem with lucene and paging.
I need to be able to specify that I only want the resultset for example page 5 and that there is like 10 items on each page.
I have seen that you can do it with opensearch but how do you do it with lucene?
I need to be able to specify that I only want the resultset for example page 5 and that there is like 10 items on each page.
I have seen that you can do it with opensearch but how do you do it with lucene?
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2007 03:54 AM
Lucene does not support paging.
What you can do though, is run the search then skip results until you get to the page you are interested in.
What you can do though, is run the search then skip results until you get to the page you are interested in.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2007 04:11 AM
thanks for you answer.
Skipping rows is an awful solution, but if there is no other then that will have to do.
But to me it looks like a limitation in Alfresco since I can find examples of how to do paging with Lucene.
Skipping rows is an awful solution, but if there is no other then that will have to do.
But to me it looks like a limitation in Alfresco since I can find examples of how to do paging with Lucene.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2007 03:06 PM
Hi,
As far as I am aware paging in lucene would involve just displaying the relevant results for the current page (effectively skipping rows), or have you found an example which does something different?
Lucene is quick, we can page results with thousands of result with very little impact on performance.
You can use the examples you have found about paging in lucene. Alfresco makes it possible for you to get to the hits and documents in the lucene results for a search.
As far as I am aware paging in lucene would involve just displaying the relevant results for the current page (effectively skipping rows), or have you found an example which does something different?
Lucene is quick, we can page results with thousands of result with very little impact on performance.
You can use the examples you have found about paging in lucene. Alfresco makes it possible for you to get to the hits and documents in the lucene results for a search.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2007 10:42 AM
The way Lucene performs its "scoring" means that it needs the full resultset to be able to judge the score of documents. OpenSearch is simply paging through the query results each time - it's not great but it works. As far as performance is concerned, 4/5 of the CPU time will be taken up by permissions evaluations in the repository - not Lucene itself. You can configure Alfresco to stop processing permissions after a certain number or time taken and ignore the rest - as the results will be returned in score order anyway - and let's be honest, most users don't want to see more than a few pages of results in any UI.
Thanks,
Kevin
Thanks,
Kevin
