0

I have an issue, basically I created a custom web part which inherits from SearchCoreResults.

This webpart searches all the possible tasks across WHOLE sharepoint and shows them if they are not overdue and are not completed. So i have an xslt file which renders a table, and only for active tasks, the problem is that the paging then is totaly broken.

As the paging is made on the results of full xslt result, so if the result of the search is 50/10 = 5 pages, but if from those 50 i will only show 5 tasks, it it might be like 1 taks per page, depending on the position in the general result.

My question is there a way to solve it?

Or if not, what i'm also afraid for, how to have same result but with other approach?

Hoping for good answers

1

The best solution is to limit the search result such that you only get the tasks you want to show, then standard paging will work.

0

I'm not 100% I've understood the question, but it sounds like you're using your XSL to limit the number of items displayed on a page, then trying to use the OOTB paging control.

An easier aproach is to set the "Results Per Page" to the limit you want, and have your XSL render everything that is passed to it. To Achieve the filtering you can use the "Append Text To Query" and configure some Managed Properties.

For example: if you configure a managed property called "MyStatus" and put MyStatus="Active" "Append Text To Query" field, search will only return tasks that are active.

2
  • No, i don't try to limit the results by the XSLT, just some results i dont want to show based on the status or the date ... so i just dont render them, that is why i get som soort of empty spot, but it still counted as a result for the page – Shkipper May 30 '13 at 6:12
  • Yes, so you are doing the filtering in the XSLT. If you use the "Append Text To Query" you can have the search do the filtering so they don't even get returned as results. – Neil White May 30 '13 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.