What does NumberOfProcessedResults do? (In SearchHelper.Search( SearchParameters ))

Marcel Guldemond asked on May 3, 2017 22:23

If the search is on page 5, with 20 items per page, setting DisplayResults = 20, StartingPosition to 80 and numberofprocessedresults to 20, returns 0 results.

Should I be setting numberofprocessedresults to (pagecount * itemsperpage)?

Thanks Marcel

Recent Answers


Michal Samuhel answered on May 4, 2017 09:48

Hi Marcel,

This is property in search parameters which can be used to improve overall performance. We are not using it anywhere, but it allows you to limit number of results processed when you use search API. This property is used in SearchHelper.FilterResult().

0 votesVote for this answer Mark as a Correct answer

Marcel Guldemond answered on May 8, 2017 15:13

Hi Michal, I'm not sure that really answered my question.

As per my example, NumberOfProcessedResults should be set to 100, so it covers pages 1-5? So the value of this parameter should be the index of the last item that you need to display?

My confusion stems from the requirement that if you're getting the results for a page that isn't page 1, such as page 5, or 8, or 12, you still have to process all the pages of items before that. Would it not make more sense to have a parameter to tell the search to only process the items for the requested page(s)?

I guess this helps with performance because most search requests are usually going to be for one of the earlier pages, but if you do need a page that's not at the beginning, this parameter doesn't really help performance if you have to process most of the results anyway.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.