MIP Search load more,Append data to the MIP Search while opened

Hello,

I am trying to integrate with the new MIP Search Plugin and im facing an issue regarding the data fetching in the smart client on filter change.

What i need to do: create a lazy load on scroll viewer scroll (or a load more button at the bottom).

What im facing: I didnt find an event to attach on the scroll viewer end scroll so i created a load more button to appear as a search result and on click:

Fetch new results, append to the existing one and retrigger ‘FireSearchResultsReadyEvent’ with a new or the existing SessionId and it didnt yield any changes on the view.

Hi Anthony,

What you are trying to implement sounds like a variation of a “pagination” scheme. This was deliberately decided against in the design phase.

So you really should just deliver ALL the results you have available for the given search input. Ideally you can provide them “in chunks” (i.e. call FireSearchResultsReadyEvent multiple times during your one call to the Search() method) as this will give the user some feedback that something is happening and results will trickle in.

The result list (tile view) has a custom-built UI-virtualization mechanism built-in, meaning that it knows about ALL results (i.e. instances of SearchResultData or derivatives), but it only ever has at most X UI controls in memory at any given time. X denotes the maximum number of results that can be displayed with your given screen resolution and thumbnail size.

So in conclusion: Please avoid adding a “load more” button to the result area, but rather deliver ALL of your results when Search() is called; preferably in chunks.

To provide some insight into why you’re not seeing new results based on what you describe in the last paragraph of your question: The search framework starts a search by calling the Search() framework and providing you with a SessionId. Once you return from the Search() method, your search is considered finished, and any results delivered after this point-in-time will effectively be ignored.