-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: fuzzy and operator usage when handling IS requests #2568
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
@@ -97,4 +111,29 @@ export const useProductGalleryQuery = ({ | |||
} | |||
}, | |||
}) | |||
|
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.
The main change that differ from #2204
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.
Amazing Job, folks! ⭐
It's good to see this topic addressed.
I left just one comment regarding the analytics event that we can double-check with the IS team. But it's non-blocking.
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.
Great job! ✨
## What's the purpose of this pull request? Follow-up of #2568 We are currently sending `search.query` events type instead of `search.autocomplete.query` when typing a term in the search input. This may be affecting some metrics. ## How to test it? Run the project locally or test though this [preview link](https://sfj-029e21e--starter.preview.vtex.app/) 1. Type `apple` in the input search field and press enter (you can slowly type it) 2. Open the `Network Tab` and filter for `event` - You might see some events with `type: "search.autocomplete.query"` <img width="500" alt="image" src="https://github.com/user-attachments/assets/5338b6f0-c6e3-4c21-ac6a-b76b8b452108"> - The last event with the full text should have` type: "search.query"` (and it should be the only event with this type). <img width="921" alt="image" src="https://github.com/user-attachments/assets/37373716-61b6-405b-b51f-52a88a99836a"> ### Starters Deploy Preview vtex-sites/starter.store#618 ## References [Slack thread](https://vtex.slack.com/archives/CP6S9HP46/p1720788576536359?thread_ts=1719365308.548959&cid=CP6S9HP46)
What's the purpose of this pull request?
This PR aims to correct fuzzy and operator usage when handling Intelligent Search API requests.
Previously, we specified a default value for fuzzy
fuzzy=auto
. But we shouldn’t include it on the first request to Search. According to the IS team, the correct behavior should let the search engine decide the best parameters for the search.Re-applies changes made from #2204 without adding the blink effect added previously.
search.query
event to ISHow it works?
More details on #2204 description.
How to test it?
Run the project locally or test though this preview link
Testing search PLP
apple
using the input search fieldNetwork Tab
and filter forClientProductGalleryQuery
Response
tab: look formetadata
object, thefuzzy
andlogicalOperator
valuesselectedFacets
search_apple.mov
Testing in Category PLP
Technology
categoryDuplicate Search event in PLP
apple
using the input search field (at once)Network Tab
and filter forevent
Starters Deploy Preview
vtex-sites/starter.store#617
References
#2204