0

I making simple SPFx search. I need to use Refiners to get data from SharePoint. Which Refiners is available to use? Can you please give me example with Refiners?

pnp.sp.search({ Querytext: queryText, SelectProperties: selectProperties, EnableSorting: true, Refiners: ["DisplayAuthor"], SortList:sorts });
1

1 Answer 1

1

You have to add Refiners in string format like:

{
  'Querytext': 'sharepoint',
  'Refiners': 'author,size',
}

Documentation: SharePoint Search REST API overview - Refiners


Also, check this issue on GitHub for more information: pnp.sp.search does not work with Refiners set

1
  • @GaneshSnap, how to get refiners by my managed propertie RefinersTextListOWSTEXT? I tried 'Refiners': 'RefinersTextListOWSTEXT' but it doesn't work
    – Ann
    Jan 16, 2023 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.