tsgrp / OpenContent

TSG's Web Services for ECM Repositories
8 stars 4 forks source link

Retrieving total number of items from FilteringResultSet #34

Open mkolas opened 10 years ago

mkolas commented 10 years ago

When we run a paginated search through Alfresco's SearchService, we are returned a FilteringResultSet which masks everything but the page of items that we want to return to the user. However- in order to know how many pages exist, we need to know how many items in total are returned by the unfiltered search. Unfortunately, access to that unfiltered ResultSet is package private.

As a workaround, we made a simple class in that package that retrieves the number of results. It's not pretty, but it works for us in the meantime. See https://github.com/tsgrp/hpi/issues/291 for the specifics.

I also made a post on the Alfresco Forums to try to further some discussion on this: https://forums.alfresco.com/forum/developer-discussions/repository-services/retrieving-total-items-filteringresultset-07252014

Let me know if you'd like me to add anything to that message.