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

feat: add fuzzy param as optional #2463

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

EmanuelRamos115
Copy link
Contributor

What's the purpose of this pull request?

adds the fuzzy parameter as an option so that the search result is more precise if the store needs it

How it works?

Basically the search api already accepts this parameter in the api, I added the same parameter to the faststore queries so stores can pass the route if they want

How to test it?

Access a search page or category by passing the parameter fuzzy=0 or fuzzy=1 and check if the result has changed

@EmanuelRamos115 EmanuelRamos115 requested a review from a team as a code owner September 18, 2024 21:00
@EmanuelRamos115 EmanuelRamos115 requested review from emersonlaurentino and pedromtec and removed request for a team September 18, 2024 21:00
Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 1:43pm

Copy link

codesandbox-ci bot commented Sep 18, 2024

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.

@higaeduardo
Copy link

You can test in this env https://sfj-f6292be--jwpepperdev.preview.vtex.app/

@renatomaurovtex renatomaurovtex added the contributing Pull request submitted by the community label Oct 7, 2024
@hellofanny
Copy link
Contributor

Hello everyone! I mentioned this in the thread, but I wanted to share it here for better visibility:

Thank you for suggesting this fix ✨ . However, this approach is not aligned with the recommendations from the IS team.
After confirming with them again, the fuzzy parameter should not be directly set by users via the API.

Here’s the expected behavior:

  • Initial request: No parameters should be sent.
  • Response: The search engine will determine the best parameters (fuzzy and operator values), which should be used for subsequent pages.
  • Subsequent requests: All pages within the same search context should use and pass these fuzzy and operator values.

We might need to make further adjustments to fix this issue, as we are currently using it incorrectly 🙇🏻‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributing Pull request submitted by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants