- Issue created by @niklan
- π·πΊRussia niklan Russia, Perm
I've prepared a patch for the tokenizer which basically "emulates" the behavior of the database server. This might be helpful for someone, but it's a dirty solution and should only work in most cases. It hasn't been tested with other search server types, so it will probably require reindexing indexes. However, since it's only related to database servers and is likely used when there's no dedicated search engine, it shouldn't cause any problems unless multiple servers are used together.
- π¦πΉAustria drunken monkey Vienna, Austria
drunken monkey β made their first commit to this issueβs fork.
- Merge request !212Resolve #3505734: Fix problems with leading zeros. β (Merged) created by drunken monkey
- π¦πΉAustria drunken monkey Vienna, Austria
Thanks for reporting this issue!
You are right, this is currently not handled correctly. Luckily, there is an easy way to fix this right in the database backend, namely at the point where we convert the search keywords to an SQL query.Please try out the MR to see if this fixes the problem for you. (I even spotted an unrelated second bug, fixed that, too.)
- π·πΊRussia niklan Russia, Perm
Thank you. I've tested it and it fixed the issue.
Now, I can even see that parsed keys do not contain any leading zeroes and it makes sense in relation to the data within the index itself.
Index: search\n Keys: 'FOO-012345'\n Parsed keys: 'foo 12345'\n Searched fields: [ALL]\n
-
drunken monkey β
committed 19ffe085 on 8.x-1.x
Issue #3505734 by drunken monkey: Fixed inconsistent processing of...
-
drunken monkey β
committed 19ffe085 on 8.x-1.x
- π¦πΉAustria drunken monkey Vienna, Austria
Good to hear, thanks a lot for testing!
Merged. Automatically closed - issue fixed for 2 weeks with no activity.