bensheldon / good_job

Multithreaded, Postgres-based, Active Job backend for Ruby on Rails.
https://goodjob-demo.herokuapp.com/
MIT License
2.62k stars 194 forks source link

Searching for an integer type argument (on the dashboard) does not yeild any results #1458

Open swaathi opened 1 month ago

swaathi commented 1 month ago

I encountered an issue while searching for jobs that have two parameters: an integer and a string. When performing a search using the string parameter, the results are accurate. However, no results are returned when searching using the integer parameter.

Additionally, the current test specifications only cover searches with the string parameter, not the integer parameter.

https://github.com/bensheldon/good_job/blob/b0c9707b487652d69264cb145ec8ec9c2aa74263/spec/app/models/concerns/good_job/filterable_spec.rb#L21-L23

Screenshots: Accurate results when searching with a string query

Screenshot 2024-08-05 at 6 11 21 PM

Nothing when searching for an integer

Screenshot 2024-08-05 at 6 10 20 PM
bensheldon commented 1 month ago

Nuts! Thanks for looking into the code and finding that scenario isn't tested. GoodJob uses Postgres fulltext search, which I'm not an expert in. Here's where the search happens:

https://github.com/bensheldon/good_job/blob/b0c9707b487652d69264cb145ec8ec9c2aa74263/app/models/concerns/good_job/filterable.rb#L38