Please verify your issue using these tools and methods before creating an Issue in the repository
We DO value your questions and loves to see more and more people starting using PnP Modern Search, however we often see issues raised that has nothing to do with PnP Modern Search but the fact that the problem becomes visible here.
The most common errors¶
- Typos or badly formed KQL queries
- Values not showing up on Managed Properties as expected
- Errors in mapping of Crawled Properties to Managed Properties (especially for Refiners)
- Custom User Profile Properties are mapped incorrectly
We would therefore ask you to verify that the API delivers the results you are expecting before we starting looking for bugs in PnP Modern Search.
Suggested tools
SharePoint Search Query Tool (stand alone application)
Guides for how to use the Query tool are available on the net, see for instance
The Must Have Tool While Working with Search and SharePoint Online (Jasper Oosterveld)
or
Using SharePoint Search Query Tool (Antti Koskela)
Video: Useful tools when working with Search Episode 2 Using the SP Query Tool(Kasper Larsen)
An older video is also availble: SharePoint Power Hour: Search Query Tool - YouTube(Laura Rogers)
Chrome extention SP Editor.(Chrome extention)
Guide: SharePoint Search Console – Now available inside Chrome SP Editor!(Antti Koskela)
Video: Useful tools when working with Search - Episode 1: Using the SP Editor(Kasper Larsen)
SP Editor Chrome Extension for SharePoint Administrators and Developers(Denis Molodtsov)
These tools gives you an exellent option to tinker with the search query and inspect the results. This will VERY often give you a clue where the issue is.
Generic query errors¶
In this case the query yields no result but you are certain that the name of the library is correct, what gives?
Turns out that the Library has been renamed but the URL is still https://m365b839353.sharepoint.com/sites/NW-B2000eBike (note the dash)
The Data is missing¶
You set up a query on a few specific libraries and knows they contains 30 documents, but only 20 shows up, weird.
There are a number of reasons:
- One of the libraries is set as not to be searchable
- Some of the documents have broken permissions and the user account you are using in the Search Tool doesn't have access
- Only checked in and published files will be indexed
- and the dreaded: the documents haven't been indexed yet
The three first reasons are fairly easy to check and correct, but that last one is a bit tricky.
The first step should be to prove or disprove the suspicion that the documents hasn't been indexed yet.
One option is to use PnP PowerShell to query the CrawlLog, see Get-PnPSearchCrawlLog. Setting the -Filter to the URL of one of the missing documents should resolve that question.
If the problem IS that the documents haven't been indexed yet, you can request a reindexing, either on a List/Library level or on a Site level.
A forced Full Index as known from On-Premises is not available in SharePoint Online.
People Search¶
Your company has added a new property to the User Properties in SharePoint and you are responsible for implementing it in search. You have found the crawled property and mapped it to a RefinableString in order to use it as a filter. You have waited the required 24 hours but the RefinableString is still not showing up. What is wrong?
Most likely you have either forgotten or didn't knew that you MUST change the full-text-index from Default to PeopleIdx in your custom Managed Property and/or RefinableString otherwise it will show up in the wrong index, and be of no use.
Follow this guide (SearchExplained) and you shouldn't encounter this problem anymore.