Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PnP Search Filters v4 - 0 Results when filtering on multi-user #2096

Closed
ileana2019 opened this issue May 19, 2022 · 16 comments
Closed

PnP Search Filters v4 - 0 Results when filtering on multi-user #2096

ileana2019 opened this issue May 19, 2022 · 16 comments
Labels
API Search API related v4 version 4

Comments

@ileana2019
Copy link

ileana2019 commented May 19, 2022

Version used
Ex: 4.5.2.0

Describe the bug
I have a RefinableString that is linked to a multi-user field in SharePoint. I get the ReifnableString results inside the Search Results and Search Filters webparts. However, when I try to filter, I get 0 results (even if I see the number of results for that filter value inside the Search Filters webpart).

To Reproduce
Steps to reproduce the behavior:

  1. Add the Search Results and Search Filters webparts to a page
  2. Connect the 2 webparts
  3. Configure a RefinableString to get data from a multi-user crawled property
  4. Display the RefinableString inside the Search Results and Search Filters webpart
  5. Filter on the RefinableString

Expected behavior
When filtering on the RefinableString, the Search Results should display the number of results that are in the brackets for that filter.

Screenshots
RefinableString

Search Results

Search Filters

Search Results 2

Search Filters2

Desktop (please complete the following information):

  • Browser Chrome

Additional context

@wobba wobba added Needs: Triage Needs investigation and repro v4 version 4 labels May 20, 2022
@FranckyC
Copy link
Collaborator

Hi, I'm able to reproduce this issue using a multi value people column and using the ows_q_USER crawled property with a RefinableString managed property. However, it works fine with the default ows_q_USER_Author property. Is your column multi value by any chance?
I can't really tell what would be the issue as we use the refinement token provided by the API response with no modification. If I use this token with SharePoint Search Query tool, I get no result as well. As a workaround you can use the regular ows_ text crawled property:

image

@FranckyC FranckyC added Needs: Author Feedback Awaiting response from the original poster of the issue. and removed Needs: Triage Needs investigation and repro labels May 22, 2022
@ileana2019
Copy link
Author

Hi @FranckyC ,
Thank you for your reply! Indeed, the user field is a multi value field. Adding the crawl property "ows_[MultiUserFieldName]" to the RefinableString and removing the crawl property "ows_q_USER_[MultiUserFieldName]" works now to filter (I get results if I filter on the values); However, if the field contains more that 1 user (since it is a multi value user field), then the filters are displayed in double:
Owner

I added also the crawl property "ows_q_USER_Author" to another RefinableString, and try to filter the search results, but still no result is found. So also that it is not working for me.

@ileana2019 ileana2019 changed the title PnP Search Filters v4 - 0 Results when filtering on user PnP Search Filters v4 - 0 Results when filtering on multi-user May 23, 2022
@wobba
Copy link
Collaborator

wobba commented May 24, 2022

I repro'd this in my tenant using classic web parts. I'm checking the internal status/opinion on the issue. Here's a related one from reddit https://www.reddit.com/r/sharepoint/comments/uvv3vw/sharepoint_online_multiuser_refinement_tokens_too/

@FranckyC
Copy link
Collaborator

Seems to be an API issue as multi values should be handled server side and split into single entries in the response. @wobba can you confirm?

@FranckyC FranckyC added API Search API related and removed Needs: Author Feedback Awaiting response from the original poster of the issue. labels May 27, 2022
@wobba
Copy link
Collaborator

wobba commented May 28, 2022

@FranckyC it's an API issue and will report once I know more.

@wobba
Copy link
Collaborator

wobba commented Jun 8, 2022

The issue was identified internally and a fix is made. Should roll out over the next weeks.

@ileana2019
Copy link
Author

Is this issue solved in v4.7?

@wobba
Copy link
Collaborator

wobba commented Aug 14, 2022

@ileana2019 API issue, not web part issue.

@mmohamedbasith
Copy link

Hi @wobba , Do you have insight on whether the API issue is fixed? I am seeing the issue with multi select person column not filtering (i am using react modern search webpart) .

your insight would be helpful .

@wobba
Copy link
Collaborator

wobba commented Sep 25, 2022

Depending on web part version it could be related to the newly logged SharePoint/sp-dev-docs#8443

@yvsuhas
Copy link

yvsuhas commented Mar 23, 2023

Hi @wobba, do you know if this fix is rolled out to all tenants as I still see the issue in Microsoft search filters that were configured under a custom vertical using OOTB setting and the same issue occurs in case of PnP Search Filter webpart as well? The issue occurs for multi select managed metadata and multi select people picker fields.

@wobba
Copy link
Collaborator

wobba commented Mar 31, 2023

@yvsuhas I recommend logging a new support case if it's still not resolved. Or comment on the above sp-dev-docs issue.

@yvsuhas
Copy link

yvsuhas commented Jul 3, 2023

Hi @wobba, we've raised a support case with Microsoft and received the following response:

Detailed problem statement: When we try to filter the search results, the available options in the dropdown are shown in the format that is stored in the library instead of showing single values for the person or group column and it displays correct values (single values) for the managed metadata field

Our support escalations has identified the behavior as by design. Unfortunately, we don't have any workarounds for this issue at this moment however you can certainly provide your Product Feedback and Suggestions on the link below as many features of the current program were designed and upgraded based on customer feedback.

Any thoughts?

@JoeAyre
Copy link

JoeAyre commented Sep 21, 2023

Hi @wobba - same issue in our tenant in Australia. The filter returned the people fine, it's just that if more than one person is added, they should in a concatenated line e.g., user1;user2;user3. I had hoped (and kind of expected) that they would be shown as separate filters i.e., as separate selectable check boxes to refine the results on e.g., user1.

Be great if you could advise on what (if anything) can be done to get the desired behaviour.
Thanks as always,
Joe

@JoeAyre
Copy link

JoeAyre commented Feb 27, 2024

Hi @wobba @FranckyC
I revisited this issue to see if any change had occured and it seems there has been a slight change.
When I map a multi value person column to a refinablestringXX using the OWS_Q_USER_ crawled property, and then use the refinablestringXX in the filters web part, it no longer concatenates all the users, and just shows single users. The problem is though that it displays too much information about that user. Ideally it would just show the display name, but instead it shows e.g.,

FirstName.LastName@thedomain.com | LastName, FirstName | ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF123456 i:0#.f|membership|FirstName.LastName@thedomain.com

It would be great it there was a way to modify this so that it just shows e.g., FirstName LastName.

Any suggestions would be welcome.
Thanks.

@kasperbolarsen
Copy link
Collaborator

Please don't comment on a closed case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Search API related v4 version 4
Projects
None yet
Development

No branches or pull requests

7 participants