pagermon icon indicating copy to clipboard operation
pagermon copied to clipboard

Cant search for words that have a - in it

Open svenskoni opened this issue 1 year ago • 4 comments

Describe the bug Hello Friends, I have the problem that when I search for the word "Intern-1" I only get alarms with the word "Intern-2" and no alarms with Internal-1 are displayed to me . This concerns all alarms with a -. Some things I can't search for at all, such as "Verlegung-1 ohne Sonderrechte".

To Reproduce

  1. Go to 'search an type anything with a -'

Expected behavior If i search for "Intern-1" it should show only "Intern-1" and not "Intern-2" Screenshots Unbenannt

Environment information:

  • OS: Ubuntu 22.04.2 LTS
  • Other details: Pagermon 0.3.12-beta

svenskoni avatar Mar 20 '23 16:03 svenskoni

Try searching for Intern%1, does that work?

Dev note for later: Possibly related to Boolean matches/hyphens being a modifier. Needs further investigation oneday https://github.com/pagermon/pagermon/blob/a5c983d7d1445cf10ea3e2aa3ad77dae11049476/server/routes/api.js#L599

geelongmicrosoldering avatar Mar 20 '23 18:03 geelongmicrosoldering

Nope didnt work Unbenannt

svenskoni avatar Mar 20 '23 18:03 svenskoni

It did in part. It got rid of the "but not if it contains 1" condition the -1 was causing. Intern-1 translates to "Contains Intern, but does not contain 1". Im busy for a couple of days but if nobody else does in the meantime I'll look into some kind of workaround

geelongmicrosoldering avatar Mar 20 '23 20:03 geelongmicrosoldering

The search code is terrible since i changed us over to Knex. I have nfi how to fix it though 🤣 There was an enhancement in somewhere to improve/expand on the search functioinality.

DanrwAU avatar Jun 30 '23 06:06 DanrwAU