PnP JS core library provides wrapper object with more customized search results data for developers. Like other programming models like REST API or JSOM, PnP JS core also provides the raw search results as RawSearchResults object. Additionally, PnP JS core also provides few other objects, which is customized for developers. These objects are customized, and retrieved from the RawSearchResults object, which in turn is part of the JSON result.
Search Results Object:
Notable objects are listed below.
- PrimarySearchResults – This object gets the formatted results from the RawSearchResults object. That is, this object will contain the necessary search results data that can be processed or displayed. It contains the formatted results from the following path. RawSearchResults.PrimaryQueryResult.RelevantResults.Table.Rows
- RowCount – Number of rows retrieved during the search query.
- TotalRows – Number of items available for search query.