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

fix: remove trailing spaces from extracted query #6432

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

camdencheek
Copy link
Member

When we remove the mentions, for some reason we're trimming spaces from the start, but not the end. This means our exact match heuristics won't work as well for these situations because there's a rogue space at the end of the query.

This just fixes the logic to trim spaces from both the start and end

Test plan

This query used to give less relevant results because we kept the trailing space:
CleanShot 2024-12-20 at 10 53 31@2x

@camdencheek camdencheek marked this pull request as ready for review December 20, 2024 17:55
@thenamankumar thenamankumar merged commit 78da6bb into main Dec 23, 2024
37 of 38 checks passed
@thenamankumar thenamankumar deleted the cc/fix-trailing-space branch December 23, 2024 06:01
abeatrix pushed a commit that referenced this pull request Dec 23, 2024
…query (#6440)

When we remove the mentions, for some reason we're trimming spaces
from the start, but not the end. This means our exact match heuristics
won't work as well for these situations because there's a rogue
space at the end of the query.

This just fixes the logic to trim spaces from both the start and end

## Test plan

This query used to give less relevant results because we kept the
trailing space:
![CleanShot 2024-12-20 at 10 53
31@2x](https://github.com/user-attachments/assets/f49246ee-99cf-47b2-835a-34505ab7ac5d)
 <br> Backport 78da6bb from #6432

Co-authored-by: Camden Cheek <[email protected]>
abeatrix pushed a commit that referenced this pull request Dec 23, 2024
…#6446)

When we remove the mentions, for some reason we&#39;re trimming spaces
from the start, but not the end. This means our exact match heuristics
won&#39;t work as well for these situations because there&#39;s a rogue
space at the end of the query.

This just fixes the logic to trim spaces from both the start and end

## Test plan

This query used to give less relevant results because we kept the
trailing space:
![CleanShot 2024-12-20 at 10 53
31@2x](https://github.com/user-attachments/assets/f49246ee-99cf-47b2-835a-34505ab7ac5d)
 <br> Backport 78da6bb from #6432

Co-authored-by: Camden Cheek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants