November Happy Hour will be moved to Thursday December 5th.

Search client only retrieves 10 items? How can I get all?

Vote:
 

 var results = _searchClient.Search<T>().GetPagesResult();

Returns 10 items but there's 137.....how can I get all 137?

#257117
Jun 25, 2021 11:52
Vote:
 

Hi Sonya,

You should use pagination by using .Take and .Skip function but if you want all the results then you can pass item number in.Take function

var query = SearchClient.Instance.Search<PageData>()
                                .Take(1000);

    var batch = query.GetContentResult();

And if you want all the results then you can refer to this -

http://joelabrahamsson.com/retrieve-full-result-set-with-episerver-find/

#257119
Edited, Jun 25, 2021 13:06
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.