Forum Discussion

Mike Jansen's avatar
Mike Jansen
Iron Contributor
Oct 06, 2017

pnp.sp.search > syntax question (from SharePoint search API URL to PnP)

For the first time I do some testing using pnp.sp.search.  My first simple test is like this: pnp.sp.search("SharePoint").then((result : SearchResults) Now I want to convert an api search to pnp. ...
  • Mike Jansen's avatar
    Mike Jansen
    Oct 10, 2017

    Got it!! I tried to put the filter in the querytekst. Seems to be a wrong approach. This is the working code:

     pnp.sp.search(<SearchQuery>{
          Querytext: "ContentType:TEST_matters",
          RowLimit: 10,
          EnableInterleaving: true,
          RefinementFilters: ["RefinableString18:equals('false')"],
          }).then((result: SearchResults) =>

Resources