-
Notifications
You must be signed in to change notification settings - Fork 36
fix(headless): advanced search queries parameters are not passed along #5173
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
Merged
ThibautNazare
merged 3 commits into
master
from
bugfix/SVCC-4986_advanced-search-queries-parameters-are-not-passed-along
Apr 22, 2025
Merged
fix(headless): advanced search queries parameters are not passed along #5173
ThibautNazare
merged 3 commits into
master
from
bugfix/SVCC-4986_advanced-search-queries-parameters-are-not-passed-along
Apr 22, 2025
+86
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request ReportPR Title✅ Title follows the conventional commit spec. Live demo linksBundle Size
|
lbergeron
reviewed
Apr 11, 2025
f5d9243
to
3eb499c
Compare
lbergeron
approved these changes
Apr 11, 2025
louis-bompart
requested changes
Apr 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the scope of this PR; the state "fishing" should be done in the selector.
At large, the whole constructAnswerQueryParams
should be a compound selector (and the generateFacetParams
added outside the compound selector)
packages/headless/src/features/advanced-search-queries/advanced-query-selectors.ts
Outdated
Show resolved
Hide resolved
3eb499c
to
6696f50
Compare
louis-bompart
approved these changes
Apr 17, 2025
6696f50
to
f874f9d
Compare
f874f9d
to
b68552b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SVCC-4986
Bug Description
On Wednesday, April 9th, we received a message about a customer having issues with the search page. The generated answer was returning citations that should be filtered out. They open a discuss with details.
A similar search page as the setup by the customer but using facets filtering was provided to us to reproduce the issue but we were unable to reproduce it.
After meeting with customers and observing the behaviour, we discovered that the customer was leveraging the cq advance search queries parameter to be able to filter results displayed to user, based on a value set in the user session.
Root cause search
Based on the fact that searches were not returning valid results only when an answerConfigurationId was set in the search page, we started by making sure that the answerAPI was handling correctly this advanced search query parameter. Once that was validated, we moved up the chain and made sure in headless that this parameter was transmitted to AnswerAPI in the generated request. There, we found out that not only
cq
parameter was not passed along to the request, but also that theaq
,dq
andlq
advanced search query parameters were not passed along.Solution
Even though the customer is only using
cq
, we decided to pass along all advanced search queries parameters to the API.Tests & Example page updated
Unit test mock and expected payload have been updated. I also updated the example genqa page so that we have an example of how-to activate those parameters nearby.
How to test locally
npx nx run headless:test
packages/atomic/dev/examples/genqa.html
file to add a answerConfirgurationId(fc581be0-6e61-4039-ab26-a3f2f52f308f
) as a property in the component at line 124npx nx run atomic:dev
/generate
request