thegazelle-ad / gazelle-server

Server for front-end and editor tools of The Gazelle
MIT License
19 stars 8 forks source link

Search is case sensitive #450

Closed emilgoldsmith closed 5 years ago

emilgoldsmith commented 5 years ago

Expected Behavior

searching for Lorem should also find cases of lorem and vice versa

Current Behavior

on staging I searched for title and it didn't find any of the articles that are ALL named TITLE-XX

Possible Solution

Probably we can just add LOWER somewhere in the SQL statement? http://www.sqlinfo.net/mysql/mysql_function_upper_lower.php

Steps to Reproduce (for bugs)

  1. Search for title on staging
  2. search for TITLE on staging
  3. see difference (no results on first, full results on second)
navyasuri commented 5 years ago

@emilgoldsmith Apparently this is a problem only on the staging server? Just checked the actual website and search there is case-insenstive. If you can confirm, we can close the issue.

emilgoldsmith commented 5 years ago

Can you give me an example of it being case insensitive on the website?

emilgoldsmith commented 5 years ago

Hmm okay I can see it looks pretty good on the main website. I still think we should try and understand what's going on the staging server though? As it indicates trouble in the code though it may not be what I thought at first. I also think I just crashed the staging server by trying to search on it?

navyasuri commented 5 years ago

Attached are 3 images which show different cases for the same query. Results returned are consistentl. 1 2 3

navyasuri commented 5 years ago

Yup, you just managed to crash it. I'll take a look and see if I can figure out why it breaks - but the problem for now is only staging server specific?

emilgoldsmith commented 5 years ago

Yeah I actually did a strikingly similar test haha, just with football FOOTBALL fOotBall or something like that haha. And I got it consistent too.

It's definitely a problem that should be figured out in theory. But we have a lot of pretty critical bugs / vulnerabilities / lacking features right now so I'll leave it up to you to prioritize where your time is best spent. I can close this issue for now anyway. If you want you can create a new one with the actual issue.