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

Cant search for words that have a - in it #550

Open
svenskoni opened this issue Mar 20, 2023 · 4 comments
Open

Cant search for words that have a - in it #550

svenskoni opened this issue Mar 20, 2023 · 4 comments
Labels
bug DB KNEX Issues relating to the Knex query builder itself

Comments

@svenskoni
Copy link

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 svenskoni added the bug label Mar 20, 2023
@geelongmicrosoldering
Copy link
Collaborator

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

qb.whereRaw(`MATCH(messages.message, messages.address, messages.source) AGAINST (? IN BOOLEAN MODE)`, query)

@svenskoni
Copy link
Author

Nope didnt work
Unbenannt

@geelongmicrosoldering
Copy link
Collaborator

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

@DanrwAU
Copy link
Member

DanrwAU commented Jun 30, 2023

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 DanrwAU added DB KNEX Issues relating to the Knex query builder itself labels Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug DB KNEX Issues relating to the Knex query builder itself
Projects
None yet
Development

No branches or pull requests

3 participants