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

Connect to Search Results Web Part Differs from Query #4195

Open
jenkijon opened this issue Jan 21, 2025 · 4 comments
Open

Connect to Search Results Web Part Differs from Query #4195

jenkijon opened this issue Jan 21, 2025 · 4 comments
Labels
Needs: Triage Needs investigation and repro

Comments

@jenkijon
Copy link

Remove the above section before submitting, and removal of the below template will result in the issue being closed.

Follow the template below or we will have to delete this request!!

We can assist a lot faster if you provide the following information:

Version used
4.8.0

Describe the bug
Hello. When I setup a Search Results query and then try to use the "Connect to a search results Web Part" where I connect to the Verticals and use the tab value it does not function as expected. Or at least functions in a different way that just using the query.

For examples if I setup the query as follows:
{?{searchTerms} -ContentClass=urn:content-class:SPSPeople} Path:<> RefinableString05=a***

RefinableString05 is mapped to a multi-select choice field and here are some of the choices:

  • Antibiotics in IR
  • Avagard
  • Difficult Airway

In the example above I would get 2 results because 2 of the 3 choices start with the letter 'A'.

If I remove the RefinableString option from the query though and use the "Connect to a search results Web Part" I do not get the same results.

For examples if I setup the query as follows I get 3 results as expected:
{?{searchTerms} -ContentClass=urn:content-class:SPSPeople} Path:<>

I then setup the Connect as follows:

  • Connect to Source: PnP - Search Verticals
  • PnP - Search Verticals properties: Choose the vertical web part.
  • Search Verticals Web Part: selectedVertical
  • selectedVerticals's properties: value
  • Destination field name: RefinableString05

In the Vertical Web Part I have the value set as = a*** to mimic what I removed from the query. The expectation here is o get 2 results since 2 of the 3 options start with the letter 'A' . I would then add another option to the vertical for = d*** to get all results that start with the letter 'D'. The issue I am having is the results for = a*** is now giving me all 3 because 'Difficult Airway' has the second word starting with the letter 'A'. The query only looks at the first word but the Connect to a search results using the tab value from a vertical looks at all words.

I wanted to setup an A-Z Vertical where the results connect to this vertical and only use the first word like the query.

Please let me know if you need additional information or screen shots to properly reproduce this. I feel like I am not including the information as clearly as needed.

To Reproduce
Detailed steps to reproduce the behavior:
See above.

Expected behavior
I would expect the Connect to a search results web part using a Vertical tab value would work the same as using the option directly in the query. The RefinableString05=a*** should only use the first word like the query, and not all words.

Screenshots

Image
This gives me 2 results.

Image

Image
This gives me 3 results.

Desktop (please complete the following information):
This occurs using Edge, Chrome, and Brave.

Additional context
Add any other context about the problem here.

@kasperbolarsen
Copy link
Collaborator

:-) What a coincidence, I have just made something similar, and will be talking about it in the call this afternoon (CET) https://pnp.github.io/#events

The YT video about the setup is here:
https://youtu.be/BoxnKpEhzDg?si=UcBpxP4ckldm3dgS

@wobba
Copy link
Collaborator

wobba commented Feb 2, 2025

Seems to be a : vs = issue. And not sure you edited something, but having one * is enough as it covers one or more characters.

@jenkijon
Copy link
Author

@kasperbolarsen I see what you did there. Unfortunately that will not work in my current situation. I am using a multi select option so we cannot use the Calculated column. I will use your process for any single select options I setup though.

Thanks.

@jenkijon
Copy link
Author

@wobba thanks for the response. I'll use a single * and see how : works vs =.

JJ

@wobba wobba added the Needs: Triage Needs investigation and repro label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage Needs investigation and repro
Projects
None yet
Development

No branches or pull requests

3 participants