microsoft-search / pnp-modern-search

Home of PnP Modern Search solutions, helping you move from classic to modern SharePoint and beyond
https://microsoft-search.github.io/pnp-modern-search
Other
379 stars 332 forks source link

Refiners in Filters Web Part not Updating After Term Rename #3722

Closed dontthroworanges closed 3 months ago

dontthroworanges commented 3 months ago

Version used Ex: 4.10.1

Describe the bug My refiners are tied to managed metadata terms and over time I have renamed quite a few to be consistent. After the rename, the column value properly updates with the new name. However, when looking in the Filters web part, the old values still show. I have found that only manually removing the metadata, and then re-adding it, will force the refiner to show the correct name. Since several thousand documents are possibly affected by this, some other resolution needs to be presented.

To Reproduce Detailed steps to reproduce the behavior:

  1. Rename Term
  2. Confirm column properly updates
  3. Open Filters Web Part
  4. Navigate to Refiners
  5. Term Name Not Updates

Expected behavior Upon renaming a term, and the column reflecting the rename, the refiners should also change without manual intervention.

Screenshots Post Term Rename Shows Correct Name in Document Library Column Screenshot 2024-05-01 112838 Post Term Rename - Refiners not updated Screenshot 2024-05-01 112746

Desktop (please complete the following information):

Additional context Various terms were renamed at least two weeks ago, so time does not appear to affect this issue.

kasperbolarsen commented 3 months ago

Could you check the value return by the API, using SP Editor or the SharePoint Search Query tool? I am pretty sure that this is a reindex issue, so it is likely that the item hasn't been indexed since you updated the term label

dontthroworanges commented 3 months ago

Could you check the value return by the API, using SP Editor or the SharePoint Search Query tool? I am pretty sure that this is a reindex issue, so it is likely that the item hasn't been indexed since you updated the term label

Hi Kasper, Looks like it may be an indexing issue as you theorized. The Managed Property as shown in SP Search Query Tool shows the original term name.

kasperbolarsen commented 3 months ago

You should be able to provide good data for a NS support ticket by running https://pnp.github.io/powershell/cmdlets/Get-PnPSearchCrawlLog.html Against one or more of the records, showing that it has been updated and NOT indexed in a timely fashion

wobba commented 3 months ago

A term rename will not be reflected in search unless you update the item or reindex the item. This is expected (afaik) and not a bug.

kasperbolarsen commented 3 months ago

That is very unfortunately in cases like this, as the person updating the Department termset label for the 5th time this year😉 have no idea where that term is used. The only solution is to run a certain script 🤣 However, this issue is not a PnP Modern search issue even though it is visible here.