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

v1 quicksearch string matching bug #346

Open
1 task done
josh-chamberlain opened this issue Jul 2, 2024 · 3 comments · May be fixed by #347
Open
1 task done

v1 quicksearch string matching bug #346

josh-chamberlain opened this issue Jul 2, 2024 · 3 comments · May be fixed by #347
Assignees
Labels
bug Something isn't working quick search v1

Comments

@josh-chamberlain
Copy link
Contributor

josh-chamberlain commented Jul 2, 2024

Context

flagging this partly because it went unnoticed for so long—we should make sure we are not replicating things like this with new search: #249

Description

This is related to unexpected/missing search results in ways I don't quite understand.

Search 1: dashboard in allegheny county

Search 2: all in allegheny county jail

Search 3: dashboard in allegheny county jail

Requirements

  • diagnose the bug + identify possible steps to fix
@josh-chamberlain josh-chamberlain added bug Something isn't working quick search v1 labels Jul 2, 2024
@josh-chamberlain josh-chamberlain changed the title v1 quicksearch bug v1 quicksearch string matching bug Jul 2, 2024
@EvilDrPurple
Copy link

Can confirm this bug is still present in dev branch of v2 as well

@EvilDrPurple EvilDrPurple self-assigned this Jul 5, 2024
@EvilDrPurple
Copy link

EvilDrPurple commented Jul 5, 2024

It seems the issue was with the .title() here:

cursor.execute(QUICK_SEARCH_SQL.format(search.title(), location.title()))

The function capitalizes the start of every word, causing some searches to slip through the cracks since they are case sensitive. Removing them fixed the outlined searches. I'm going to make it so that the search terms and the database terms are lowercased to solve any case-sensitivity issues in searches. That is assuming there was no foreseeable reason for it to have been set up this way in the first place

@EvilDrPurple
Copy link

PRs submitted for both v1 and v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working quick search v1
Projects
Status: Dev testing
Development

Successfully merging a pull request may close this issue.

2 participants